late-sdk 0.0.899 → 0.0.901

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 (223) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +81 -8
  3. data/docs/AdAccountsApi.md +1375 -277
  4. data/docs/AdCampaignsApi.md +525 -13
  5. data/docs/AdCreative.md +6 -0
  6. data/docs/AdTracking.md +20 -0
  7. data/docs/AddAccountCalloutsRequest.md +3 -3
  8. data/docs/AddAccountSitelinks201Response.md +20 -0
  9. data/docs/AddAccountSitelinks201ResponseSitelinksInner.md +26 -0
  10. data/docs/AddAccountSitelinksRequest.md +22 -0
  11. data/docs/AddAccountStructuredSnippets201Response.md +20 -0
  12. data/docs/AddAccountStructuredSnippets201ResponseStructuredSnippetsInner.md +22 -0
  13. data/docs/AddAccountStructuredSnippetsRequest.md +22 -0
  14. data/docs/AttachAdGroupAssets201Response.md +24 -0
  15. data/docs/AttachCampaignAssetsRequest.md +4 -4
  16. data/docs/CreateAdCampaign200Response.md +26 -0
  17. data/docs/CreateAdCampaignRequest.md +8 -0
  18. data/docs/CreateCallAdRequest.md +2 -0
  19. data/docs/CreateMessagingAdRequest.md +2 -0
  20. data/docs/CreateStandaloneAdRequest.md +15 -7
  21. data/docs/CreateStandaloneAdRequestAdditionalDescriptionsInner.md +49 -0
  22. data/docs/CreateStandaloneAdRequestAdditionalHeadlinesInner.md +49 -0
  23. data/docs/CtwaAdRequestBody.md +2 -0
  24. data/docs/GetAd200Response.md +5 -1
  25. data/docs/GetAdComments200ResponseMeta.md +10 -4
  26. data/docs/GetIosFourteenCampaignLimits200Response.md +18 -0
  27. data/docs/GetIosFourteenCampaignLimits200ResponseLimits.md +22 -0
  28. data/docs/GoogleAssetUpdate.md +26 -0
  29. data/docs/GoogleRsaDescription.md +20 -0
  30. data/docs/GoogleRsaHeadline.md +20 -0
  31. data/docs/{AttachCampaignAssetsRequestSitelinksInner.md → GoogleSitelink.md} +2 -2
  32. data/docs/{AttachCampaignAssetsRequestStructuredSnippetsInner.md → GoogleStructuredSnippet.md} +2 -2
  33. data/docs/HideAdComment200Response.md +22 -0
  34. data/docs/HideAdCommentRequest.md +18 -0
  35. data/docs/ListAccountCallouts200Response.md +2 -2
  36. data/docs/ListAccountCallouts200ResponseCalloutsInner.md +3 -3
  37. data/docs/ListAccountSitelinks200Response.md +24 -0
  38. data/docs/ListAccountSitelinks200ResponseSitelinksInner.md +32 -0
  39. data/docs/ListAccountStructuredSnippets200Response.md +24 -0
  40. data/docs/ListAccountStructuredSnippets200ResponseStructuredSnippetsInner.md +28 -0
  41. data/docs/ListAdGroupAssets200Response.md +28 -0
  42. data/docs/ListAdGroupAssets200ResponseCalloutsInner.md +22 -0
  43. data/docs/ListAdGroupAssets200ResponseSitelinksInner.md +28 -0
  44. data/docs/ListAdGroupAssets200ResponseStructuredSnippetsInner.md +24 -0
  45. data/docs/ListAdsInstagramAccounts200Response.md +22 -0
  46. data/docs/ListAdsInstagramAccounts200ResponseAccountsInner.md +26 -0
  47. data/docs/ListAdsInstagramAccounts200ResponsePagesInner.md +24 -0
  48. data/docs/ListAdsInstagramAccounts200ResponseResolved.md +22 -0
  49. data/docs/ListAdvertisableApplications200Response.md +18 -0
  50. data/docs/ListAdvertisableApplications200ResponseApplicationsInner.md +24 -0
  51. data/docs/ListCampaignAssets200Response.md +28 -0
  52. data/docs/ListCampaignAssets200ResponseCalloutsInner.md +22 -0
  53. data/docs/ListCampaignAssets200ResponseSitelinksInner.md +28 -0
  54. data/docs/ListCampaignAssets200ResponseStructuredSnippetsInner.md +24 -0
  55. data/docs/MetaInstagramIdentityRef.md +22 -0
  56. data/docs/RemoveAccountCalloutRequest.md +3 -3
  57. data/docs/RemoveAdGroupAssetsRequest.md +24 -0
  58. data/docs/RemoveCampaignAssets200Response.md +18 -0
  59. data/docs/RemoveCampaignAssetsRequest.md +24 -0
  60. data/docs/ReplyToAdComment200Response.md +20 -0
  61. data/docs/ReplyToAdCommentRequest.md +18 -0
  62. data/docs/TargetingSpec.md +4 -0
  63. data/docs/UpdateAccountCallouts200Response.md +20 -0
  64. data/docs/UpdateAccountCalloutsRequest.md +22 -0
  65. data/docs/UpdateAccountCalloutsRequestUpdatesInner.md +20 -0
  66. data/docs/UpdateAccountCalloutsRequestUpdatesInnerCalloutAsset.md +18 -0
  67. data/docs/UpdateAccountSitelinksRequest.md +22 -0
  68. data/docs/UpdateAccountSitelinksRequestUpdatesInner.md +22 -0
  69. data/docs/UpdateAccountSitelinksRequestUpdatesInnerSitelinkAsset.md +24 -0
  70. data/docs/UpdateAccountStructuredSnippetsRequest.md +22 -0
  71. data/docs/UpdateAccountStructuredSnippetsRequestUpdatesInner.md +20 -0
  72. data/docs/UpdateAdRequest.md +6 -0
  73. data/docs/UpdateCampaignAssets200Response.md +18 -0
  74. data/docs/UpdateCampaignAssetsRequest.md +22 -0
  75. data/lib/zernio-sdk/api/ad_accounts_api.rb +1511 -363
  76. data/lib/zernio-sdk/api/ad_campaigns_api.rb +589 -13
  77. data/lib/zernio-sdk/models/ad_creative.rb +112 -1
  78. data/lib/zernio-sdk/models/{create_standalone_ad_request_tracking.rb → ad_tracking.rb} +5 -5
  79. data/lib/zernio-sdk/models/add_account_callouts_request.rb +34 -3
  80. data/lib/zernio-sdk/models/add_account_sitelinks201_response.rb +158 -0
  81. data/lib/zernio-sdk/models/add_account_sitelinks201_response_sitelinks_inner.rb +267 -0
  82. data/lib/zernio-sdk/models/add_account_sitelinks_request.rb +253 -0
  83. data/lib/zernio-sdk/models/add_account_structured_snippets201_response.rb +158 -0
  84. data/lib/zernio-sdk/models/add_account_structured_snippets201_response_structured_snippets_inner.rb +229 -0
  85. data/lib/zernio-sdk/models/add_account_structured_snippets_request.rb +253 -0
  86. data/lib/zernio-sdk/models/attach_ad_group_assets201_response.rb +180 -0
  87. data/lib/zernio-sdk/models/attach_campaign_assets_request.rb +37 -5
  88. data/lib/zernio-sdk/models/create_ad_campaign200_response.rb +231 -0
  89. data/lib/zernio-sdk/models/create_ad_campaign_request.rb +52 -1
  90. data/lib/zernio-sdk/models/create_call_ad_request.rb +10 -1
  91. data/lib/zernio-sdk/models/create_messaging_ad_request.rb +10 -1
  92. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +102 -8
  93. data/lib/zernio-sdk/models/create_standalone_ad_request_additional_descriptions_inner.rb +104 -0
  94. data/lib/zernio-sdk/models/create_standalone_ad_request_additional_headlines_inner.rb +104 -0
  95. data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +10 -1
  96. data/lib/zernio-sdk/models/get_ad200_response.rb +25 -4
  97. data/lib/zernio-sdk/models/get_ad_comments200_response_meta.rb +36 -46
  98. data/lib/zernio-sdk/models/get_ios_fourteen_campaign_limits200_response.rb +164 -0
  99. data/lib/zernio-sdk/models/get_ios_fourteen_campaign_limits200_response_limits.rb +172 -0
  100. data/lib/zernio-sdk/models/google_asset_update.rb +234 -0
  101. data/lib/zernio-sdk/models/google_rsa_description.rb +226 -0
  102. data/lib/zernio-sdk/models/google_rsa_headline.rb +226 -0
  103. data/lib/zernio-sdk/models/{attach_campaign_assets_request_sitelinks_inner.rb → google_sitelink.rb} +3 -3
  104. data/lib/zernio-sdk/models/{attach_campaign_assets_request_structured_snippets_inner.rb → google_structured_snippet.rb} +3 -3
  105. data/lib/zernio-sdk/models/hide_ad_comment200_response.rb +225 -0
  106. data/lib/zernio-sdk/models/hide_ad_comment_request.rb +165 -0
  107. data/lib/zernio-sdk/models/list_account_callouts200_response.rb +2 -2
  108. data/lib/zernio-sdk/models/list_account_callouts200_response_callouts_inner.rb +13 -14
  109. data/lib/zernio-sdk/models/list_account_sitelinks200_response.rb +179 -0
  110. data/lib/zernio-sdk/models/list_account_sitelinks200_response_sitelinks_inner.rb +210 -0
  111. data/lib/zernio-sdk/models/list_account_structured_snippets200_response.rb +179 -0
  112. data/lib/zernio-sdk/models/list_account_structured_snippets200_response_structured_snippets_inner.rb +194 -0
  113. data/lib/zernio-sdk/models/list_ad_group_assets200_response.rb +201 -0
  114. data/lib/zernio-sdk/models/list_ad_group_assets200_response_callouts_inner.rb +165 -0
  115. data/lib/zernio-sdk/models/list_ad_group_assets200_response_sitelinks_inner.rb +192 -0
  116. data/lib/zernio-sdk/models/list_ad_group_assets200_response_structured_snippets_inner.rb +176 -0
  117. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response.rb +220 -0
  118. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_accounts_inner.rb +287 -0
  119. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_pages_inner.rb +210 -0
  120. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_resolved.rb +211 -0
  121. data/lib/zernio-sdk/models/list_advertisable_applications200_response.rb +166 -0
  122. data/lib/zernio-sdk/models/list_advertisable_applications200_response_applications_inner.rb +250 -0
  123. data/lib/zernio-sdk/models/list_campaign_assets200_response.rb +201 -0
  124. data/lib/zernio-sdk/models/list_campaign_assets200_response_callouts_inner.rb +165 -0
  125. data/lib/zernio-sdk/models/list_campaign_assets200_response_sitelinks_inner.rb +192 -0
  126. data/lib/zernio-sdk/models/list_campaign_assets200_response_structured_snippets_inner.rb +176 -0
  127. data/lib/zernio-sdk/models/meta_instagram_identity_ref.rb +202 -0
  128. data/lib/zernio-sdk/models/remove_account_callout_request.rb +45 -3
  129. data/lib/zernio-sdk/models/remove_ad_group_assets_request.rb +281 -0
  130. data/lib/zernio-sdk/models/remove_campaign_assets200_response.rb +147 -0
  131. data/lib/zernio-sdk/models/remove_campaign_assets_request.rb +281 -0
  132. data/lib/zernio-sdk/models/reply_to_ad_comment200_response.rb +215 -0
  133. data/lib/zernio-sdk/models/reply_to_ad_comment_request.rb +174 -0
  134. data/lib/zernio-sdk/models/targeting_spec.rb +63 -1
  135. data/lib/zernio-sdk/models/update_account_callouts200_response.rb +156 -0
  136. data/lib/zernio-sdk/models/update_account_callouts_request.rb +253 -0
  137. data/lib/zernio-sdk/models/update_account_callouts_request_updates_inner.rb +186 -0
  138. data/lib/zernio-sdk/models/update_account_callouts_request_updates_inner_callout_asset.rb +182 -0
  139. data/lib/zernio-sdk/models/update_account_sitelinks_request.rb +253 -0
  140. data/lib/zernio-sdk/models/update_account_sitelinks_request_updates_inner.rb +216 -0
  141. data/lib/zernio-sdk/models/update_account_sitelinks_request_updates_inner_sitelink_asset.rb +241 -0
  142. data/lib/zernio-sdk/models/update_account_structured_snippets_request.rb +253 -0
  143. data/lib/zernio-sdk/models/update_account_structured_snippets_request_updates_inner.rb +186 -0
  144. data/lib/zernio-sdk/models/update_ad_request.rb +112 -1
  145. data/lib/zernio-sdk/models/update_campaign_assets200_response.rb +147 -0
  146. data/lib/zernio-sdk/models/update_campaign_assets_request.rb +253 -0
  147. data/lib/zernio-sdk/version.rb +1 -1
  148. data/lib/zernio-sdk.rb +55 -4
  149. data/openapi.yaml +2898 -733
  150. data/spec/api/ad_accounts_api_spec.rb +209 -10
  151. data/spec/api/ad_campaigns_api_spec.rb +99 -6
  152. data/spec/models/ad_creative_spec.rb +18 -0
  153. data/spec/models/{create_standalone_ad_request_tracking_spec.rb → ad_tracking_spec.rb} +6 -6
  154. data/spec/models/add_account_sitelinks201_response_sitelinks_inner_spec.rb +60 -0
  155. data/spec/models/add_account_sitelinks201_response_spec.rb +42 -0
  156. data/spec/models/add_account_sitelinks_request_spec.rb +48 -0
  157. data/spec/models/add_account_structured_snippets201_response_spec.rb +42 -0
  158. data/spec/models/add_account_structured_snippets201_response_structured_snippets_inner_spec.rb +52 -0
  159. data/spec/models/add_account_structured_snippets_request_spec.rb +48 -0
  160. data/spec/models/attach_ad_group_assets201_response_spec.rb +54 -0
  161. data/spec/models/create_ad_campaign200_response_spec.rb +68 -0
  162. data/spec/models/create_ad_campaign_request_spec.rb +28 -0
  163. data/spec/models/create_call_ad_request_spec.rb +6 -0
  164. data/spec/models/create_messaging_ad_request_spec.rb +6 -0
  165. data/spec/models/create_standalone_ad_request_additional_descriptions_inner_spec.rb +32 -0
  166. data/spec/models/create_standalone_ad_request_additional_headlines_inner_spec.rb +32 -0
  167. data/spec/models/create_standalone_ad_request_spec.rb +28 -0
  168. data/spec/models/ctwa_ad_request_body_spec.rb +6 -0
  169. data/spec/models/get_ad200_response_spec.rb +12 -0
  170. data/spec/models/get_ad_comments200_response_meta_spec.rb +19 -1
  171. data/spec/models/get_ios_fourteen_campaign_limits200_response_limits_spec.rb +48 -0
  172. data/spec/models/get_ios_fourteen_campaign_limits200_response_spec.rb +36 -0
  173. data/spec/models/google_asset_update_spec.rb +60 -0
  174. data/spec/models/google_rsa_description_spec.rb +46 -0
  175. data/spec/models/google_rsa_headline_spec.rb +46 -0
  176. data/spec/models/{attach_campaign_assets_request_sitelinks_inner_spec.rb → google_sitelink_spec.rb} +6 -6
  177. data/spec/models/{attach_campaign_assets_request_structured_snippets_inner_spec.rb → google_structured_snippet_spec.rb} +6 -6
  178. data/spec/models/hide_ad_comment200_response_spec.rb +52 -0
  179. data/spec/models/hide_ad_comment_request_spec.rb +36 -0
  180. data/spec/models/list_account_callouts200_response_callouts_inner_spec.rb +2 -2
  181. data/spec/models/{create_standalone_ad_request_promoted_object_spec.rb → list_account_sitelinks200_response_sitelinks_inner_spec.rb} +14 -32
  182. data/spec/models/list_account_sitelinks200_response_spec.rb +54 -0
  183. data/spec/models/list_account_structured_snippets200_response_spec.rb +54 -0
  184. data/spec/models/list_account_structured_snippets200_response_structured_snippets_inner_spec.rb +66 -0
  185. data/spec/models/list_ad_group_assets200_response_callouts_inner_spec.rb +48 -0
  186. data/spec/models/list_ad_group_assets200_response_sitelinks_inner_spec.rb +66 -0
  187. data/spec/models/list_ad_group_assets200_response_spec.rb +66 -0
  188. data/spec/models/list_ad_group_assets200_response_structured_snippets_inner_spec.rb +54 -0
  189. data/spec/models/list_ads_instagram_accounts200_response_accounts_inner_spec.rb +64 -0
  190. data/spec/models/list_ads_instagram_accounts200_response_pages_inner_spec.rb +54 -0
  191. data/spec/models/list_ads_instagram_accounts200_response_resolved_spec.rb +52 -0
  192. data/spec/models/list_ads_instagram_accounts200_response_spec.rb +48 -0
  193. data/spec/models/list_advertisable_applications200_response_applications_inner_spec.rb +54 -0
  194. data/spec/models/list_advertisable_applications200_response_spec.rb +36 -0
  195. data/spec/models/list_campaign_assets200_response_callouts_inner_spec.rb +48 -0
  196. data/spec/models/list_campaign_assets200_response_sitelinks_inner_spec.rb +66 -0
  197. data/spec/models/list_campaign_assets200_response_spec.rb +66 -0
  198. data/spec/models/list_campaign_assets200_response_structured_snippets_inner_spec.rb +54 -0
  199. data/spec/models/meta_instagram_identity_ref_spec.rb +48 -0
  200. data/spec/models/remove_ad_group_assets_request_spec.rb +54 -0
  201. data/spec/models/remove_campaign_assets200_response_spec.rb +36 -0
  202. data/spec/models/remove_campaign_assets_request_spec.rb +54 -0
  203. data/spec/models/reply_to_ad_comment200_response_spec.rb +46 -0
  204. data/spec/models/reply_to_ad_comment_request_spec.rb +36 -0
  205. data/spec/models/targeting_spec_spec.rb +12 -0
  206. data/spec/models/update_account_callouts200_response_spec.rb +42 -0
  207. data/spec/models/update_account_callouts_request_spec.rb +48 -0
  208. data/spec/models/update_account_callouts_request_updates_inner_callout_asset_spec.rb +36 -0
  209. data/spec/models/update_account_callouts_request_updates_inner_spec.rb +42 -0
  210. data/spec/models/update_account_sitelinks_request_spec.rb +48 -0
  211. data/spec/models/update_account_sitelinks_request_updates_inner_sitelink_asset_spec.rb +54 -0
  212. data/spec/models/update_account_sitelinks_request_updates_inner_spec.rb +48 -0
  213. data/spec/models/update_account_structured_snippets_request_spec.rb +48 -0
  214. data/spec/models/update_account_structured_snippets_request_updates_inner_spec.rb +42 -0
  215. data/spec/models/update_ad_request_spec.rb +18 -0
  216. data/spec/models/update_campaign_assets200_response_spec.rb +36 -0
  217. data/spec/models/update_campaign_assets_request_spec.rb +48 -0
  218. data/zernio-sdk-0.0.901.gem +0 -0
  219. metadata +222 -18
  220. data/docs/CreateStandaloneAdRequestPromotedObject.md +0 -38
  221. data/docs/CreateStandaloneAdRequestTracking.md +0 -20
  222. data/lib/zernio-sdk/models/create_standalone_ad_request_promoted_object.rb +0 -249
  223. data/zernio-sdk-0.0.899.gem +0 -0
@@ -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
@@ -14,12 +14,12 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- # Meta only. Attaches pixel measurement to the ad regardless of the optimization goal (the \"Website events\" tracking row in Ads Manager). `pixelId` becomes the ad's `tracking_specs` (offsite_conversion + fb_pixel); `urlTags` becomes the ad's `url_tags` (click-tracking query params). Applied on the legacy single-creative shape, every ad of the multi-creative shape, and the attach shape. NOTE: tracking lives on the AD object and is not inherited from the ad set, so pass it on EVERY attach call that should carry the pixel.
18
- class CreateStandaloneAdRequestTracking < ApiModelBase
17
+ # Meta only. Attaches pixel measurement to the ad regardless of the optimization goal (the \"Website events\" tracking row in Ads Manager). `pixelId` becomes the ad's `tracking_specs` (offsite_conversion + fb_pixel); `urlTags` is stored on the new creative as `url_tags` and retained on the ad for compatibility. Applied on the legacy single-creative shape, every ad of the multi-creative shape, and the attach shape. NOTE: tracking lives on the AD object and is not inherited from the ad set, so pass it on EVERY attach call that should carry the pixel.
18
+ class AdTracking < ApiModelBase
19
19
  # Meta Pixel ID to attach for offsite-conversion measurement.
20
20
  attr_accessor :pixel_id
21
21
 
22
- # Click-URL params appended to the ad's destination as `url_tags` (e.g. utm_source). Meta dynamic macros ({{ad.id}}, {{campaign.id}}, {{placement}}, ...) are sent through unescaped so Meta expands them; every other character is percent-encoded.
22
+ # Click-URL params stored on the creative as `url_tags` and returned by GET /v1/ads/{adId}/tracking-tags. App-promotion linkUrl stays byte-identical to promotedObject.objectStoreUrl. Meta dynamic macros ({{ad.id}}, {{campaign.id}}, {{placement}}, ...) are sent through unescaped so Meta expands them; every other character is percent-encoded.
23
23
  attr_accessor :url_tags
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -58,14 +58,14 @@ module Zernio
58
58
  # @param [Hash] attributes Model attributes in the form of hash
59
59
  def initialize(attributes = {})
60
60
  if (!attributes.is_a?(Hash))
61
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateStandaloneAdRequestTracking` initialize method"
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdTracking` initialize method"
62
62
  end
63
63
 
64
64
  # check to see if the attribute exists and convert string to symbol for hash key
65
65
  acceptable_attribute_map = self.class.acceptable_attribute_map
66
66
  attributes = attributes.each_with_object({}) { |(k, v), h|
67
67
  if (!acceptable_attribute_map.key?(k.to_sym))
68
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateStandaloneAdRequestTracking`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdTracking`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
69
  end
70
70
  h[k.to_sym] = v
71
71
  }
@@ -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