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.
- checksums.yaml +4 -4
- data/README.md +81 -8
- data/docs/AdAccountsApi.md +1375 -277
- data/docs/AdCampaignsApi.md +525 -13
- data/docs/AdCreative.md +6 -0
- data/docs/AdTracking.md +20 -0
- data/docs/AddAccountCalloutsRequest.md +3 -3
- data/docs/AddAccountSitelinks201Response.md +20 -0
- data/docs/AddAccountSitelinks201ResponseSitelinksInner.md +26 -0
- data/docs/AddAccountSitelinksRequest.md +22 -0
- data/docs/AddAccountStructuredSnippets201Response.md +20 -0
- data/docs/AddAccountStructuredSnippets201ResponseStructuredSnippetsInner.md +22 -0
- data/docs/AddAccountStructuredSnippetsRequest.md +22 -0
- data/docs/AttachAdGroupAssets201Response.md +24 -0
- data/docs/AttachCampaignAssetsRequest.md +4 -4
- data/docs/CreateAdCampaign200Response.md +26 -0
- data/docs/CreateAdCampaignRequest.md +8 -0
- data/docs/CreateCallAdRequest.md +2 -0
- data/docs/CreateMessagingAdRequest.md +2 -0
- data/docs/CreateStandaloneAdRequest.md +15 -7
- data/docs/CreateStandaloneAdRequestAdditionalDescriptionsInner.md +49 -0
- data/docs/CreateStandaloneAdRequestAdditionalHeadlinesInner.md +49 -0
- data/docs/CtwaAdRequestBody.md +2 -0
- data/docs/GetAd200Response.md +5 -1
- data/docs/GetAdComments200ResponseMeta.md +10 -4
- data/docs/GetIosFourteenCampaignLimits200Response.md +18 -0
- data/docs/GetIosFourteenCampaignLimits200ResponseLimits.md +22 -0
- data/docs/GoogleAssetUpdate.md +26 -0
- data/docs/GoogleRsaDescription.md +20 -0
- data/docs/GoogleRsaHeadline.md +20 -0
- data/docs/{AttachCampaignAssetsRequestSitelinksInner.md → GoogleSitelink.md} +2 -2
- data/docs/{AttachCampaignAssetsRequestStructuredSnippetsInner.md → GoogleStructuredSnippet.md} +2 -2
- data/docs/HideAdComment200Response.md +22 -0
- data/docs/HideAdCommentRequest.md +18 -0
- data/docs/ListAccountCallouts200Response.md +2 -2
- data/docs/ListAccountCallouts200ResponseCalloutsInner.md +3 -3
- data/docs/ListAccountSitelinks200Response.md +24 -0
- data/docs/ListAccountSitelinks200ResponseSitelinksInner.md +32 -0
- data/docs/ListAccountStructuredSnippets200Response.md +24 -0
- data/docs/ListAccountStructuredSnippets200ResponseStructuredSnippetsInner.md +28 -0
- data/docs/ListAdGroupAssets200Response.md +28 -0
- data/docs/ListAdGroupAssets200ResponseCalloutsInner.md +22 -0
- data/docs/ListAdGroupAssets200ResponseSitelinksInner.md +28 -0
- data/docs/ListAdGroupAssets200ResponseStructuredSnippetsInner.md +24 -0
- data/docs/ListAdsInstagramAccounts200Response.md +22 -0
- data/docs/ListAdsInstagramAccounts200ResponseAccountsInner.md +26 -0
- data/docs/ListAdsInstagramAccounts200ResponsePagesInner.md +24 -0
- data/docs/ListAdsInstagramAccounts200ResponseResolved.md +22 -0
- data/docs/ListAdvertisableApplications200Response.md +18 -0
- data/docs/ListAdvertisableApplications200ResponseApplicationsInner.md +24 -0
- data/docs/ListCampaignAssets200Response.md +28 -0
- data/docs/ListCampaignAssets200ResponseCalloutsInner.md +22 -0
- data/docs/ListCampaignAssets200ResponseSitelinksInner.md +28 -0
- data/docs/ListCampaignAssets200ResponseStructuredSnippetsInner.md +24 -0
- data/docs/MetaInstagramIdentityRef.md +22 -0
- data/docs/RemoveAccountCalloutRequest.md +3 -3
- data/docs/RemoveAdGroupAssetsRequest.md +24 -0
- data/docs/RemoveCampaignAssets200Response.md +18 -0
- data/docs/RemoveCampaignAssetsRequest.md +24 -0
- data/docs/ReplyToAdComment200Response.md +20 -0
- data/docs/ReplyToAdCommentRequest.md +18 -0
- data/docs/TargetingSpec.md +4 -0
- data/docs/UpdateAccountCallouts200Response.md +20 -0
- data/docs/UpdateAccountCalloutsRequest.md +22 -0
- data/docs/UpdateAccountCalloutsRequestUpdatesInner.md +20 -0
- data/docs/UpdateAccountCalloutsRequestUpdatesInnerCalloutAsset.md +18 -0
- data/docs/UpdateAccountSitelinksRequest.md +22 -0
- data/docs/UpdateAccountSitelinksRequestUpdatesInner.md +22 -0
- data/docs/UpdateAccountSitelinksRequestUpdatesInnerSitelinkAsset.md +24 -0
- data/docs/UpdateAccountStructuredSnippetsRequest.md +22 -0
- data/docs/UpdateAccountStructuredSnippetsRequestUpdatesInner.md +20 -0
- data/docs/UpdateAdRequest.md +6 -0
- data/docs/UpdateCampaignAssets200Response.md +18 -0
- data/docs/UpdateCampaignAssetsRequest.md +22 -0
- data/lib/zernio-sdk/api/ad_accounts_api.rb +1511 -363
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +589 -13
- data/lib/zernio-sdk/models/ad_creative.rb +112 -1
- data/lib/zernio-sdk/models/{create_standalone_ad_request_tracking.rb → ad_tracking.rb} +5 -5
- data/lib/zernio-sdk/models/add_account_callouts_request.rb +34 -3
- data/lib/zernio-sdk/models/add_account_sitelinks201_response.rb +158 -0
- data/lib/zernio-sdk/models/add_account_sitelinks201_response_sitelinks_inner.rb +267 -0
- data/lib/zernio-sdk/models/add_account_sitelinks_request.rb +253 -0
- data/lib/zernio-sdk/models/add_account_structured_snippets201_response.rb +158 -0
- data/lib/zernio-sdk/models/add_account_structured_snippets201_response_structured_snippets_inner.rb +229 -0
- data/lib/zernio-sdk/models/add_account_structured_snippets_request.rb +253 -0
- data/lib/zernio-sdk/models/attach_ad_group_assets201_response.rb +180 -0
- data/lib/zernio-sdk/models/attach_campaign_assets_request.rb +37 -5
- data/lib/zernio-sdk/models/create_ad_campaign200_response.rb +231 -0
- data/lib/zernio-sdk/models/create_ad_campaign_request.rb +52 -1
- data/lib/zernio-sdk/models/create_call_ad_request.rb +10 -1
- data/lib/zernio-sdk/models/create_messaging_ad_request.rb +10 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +102 -8
- data/lib/zernio-sdk/models/create_standalone_ad_request_additional_descriptions_inner.rb +104 -0
- data/lib/zernio-sdk/models/create_standalone_ad_request_additional_headlines_inner.rb +104 -0
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +10 -1
- data/lib/zernio-sdk/models/get_ad200_response.rb +25 -4
- data/lib/zernio-sdk/models/get_ad_comments200_response_meta.rb +36 -46
- data/lib/zernio-sdk/models/get_ios_fourteen_campaign_limits200_response.rb +164 -0
- data/lib/zernio-sdk/models/get_ios_fourteen_campaign_limits200_response_limits.rb +172 -0
- data/lib/zernio-sdk/models/google_asset_update.rb +234 -0
- data/lib/zernio-sdk/models/google_rsa_description.rb +226 -0
- data/lib/zernio-sdk/models/google_rsa_headline.rb +226 -0
- data/lib/zernio-sdk/models/{attach_campaign_assets_request_sitelinks_inner.rb → google_sitelink.rb} +3 -3
- data/lib/zernio-sdk/models/{attach_campaign_assets_request_structured_snippets_inner.rb → google_structured_snippet.rb} +3 -3
- data/lib/zernio-sdk/models/hide_ad_comment200_response.rb +225 -0
- data/lib/zernio-sdk/models/hide_ad_comment_request.rb +165 -0
- data/lib/zernio-sdk/models/list_account_callouts200_response.rb +2 -2
- data/lib/zernio-sdk/models/list_account_callouts200_response_callouts_inner.rb +13 -14
- data/lib/zernio-sdk/models/list_account_sitelinks200_response.rb +179 -0
- data/lib/zernio-sdk/models/list_account_sitelinks200_response_sitelinks_inner.rb +210 -0
- data/lib/zernio-sdk/models/list_account_structured_snippets200_response.rb +179 -0
- data/lib/zernio-sdk/models/list_account_structured_snippets200_response_structured_snippets_inner.rb +194 -0
- data/lib/zernio-sdk/models/list_ad_group_assets200_response.rb +201 -0
- data/lib/zernio-sdk/models/list_ad_group_assets200_response_callouts_inner.rb +165 -0
- data/lib/zernio-sdk/models/list_ad_group_assets200_response_sitelinks_inner.rb +192 -0
- data/lib/zernio-sdk/models/list_ad_group_assets200_response_structured_snippets_inner.rb +176 -0
- data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response.rb +220 -0
- data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_accounts_inner.rb +287 -0
- data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_pages_inner.rb +210 -0
- data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_resolved.rb +211 -0
- data/lib/zernio-sdk/models/list_advertisable_applications200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_advertisable_applications200_response_applications_inner.rb +250 -0
- data/lib/zernio-sdk/models/list_campaign_assets200_response.rb +201 -0
- data/lib/zernio-sdk/models/list_campaign_assets200_response_callouts_inner.rb +165 -0
- data/lib/zernio-sdk/models/list_campaign_assets200_response_sitelinks_inner.rb +192 -0
- data/lib/zernio-sdk/models/list_campaign_assets200_response_structured_snippets_inner.rb +176 -0
- data/lib/zernio-sdk/models/meta_instagram_identity_ref.rb +202 -0
- data/lib/zernio-sdk/models/remove_account_callout_request.rb +45 -3
- data/lib/zernio-sdk/models/remove_ad_group_assets_request.rb +281 -0
- data/lib/zernio-sdk/models/remove_campaign_assets200_response.rb +147 -0
- data/lib/zernio-sdk/models/remove_campaign_assets_request.rb +281 -0
- data/lib/zernio-sdk/models/reply_to_ad_comment200_response.rb +215 -0
- data/lib/zernio-sdk/models/reply_to_ad_comment_request.rb +174 -0
- data/lib/zernio-sdk/models/targeting_spec.rb +63 -1
- data/lib/zernio-sdk/models/update_account_callouts200_response.rb +156 -0
- data/lib/zernio-sdk/models/update_account_callouts_request.rb +253 -0
- data/lib/zernio-sdk/models/update_account_callouts_request_updates_inner.rb +186 -0
- data/lib/zernio-sdk/models/update_account_callouts_request_updates_inner_callout_asset.rb +182 -0
- data/lib/zernio-sdk/models/update_account_sitelinks_request.rb +253 -0
- data/lib/zernio-sdk/models/update_account_sitelinks_request_updates_inner.rb +216 -0
- data/lib/zernio-sdk/models/update_account_sitelinks_request_updates_inner_sitelink_asset.rb +241 -0
- data/lib/zernio-sdk/models/update_account_structured_snippets_request.rb +253 -0
- data/lib/zernio-sdk/models/update_account_structured_snippets_request_updates_inner.rb +186 -0
- data/lib/zernio-sdk/models/update_ad_request.rb +112 -1
- data/lib/zernio-sdk/models/update_campaign_assets200_response.rb +147 -0
- data/lib/zernio-sdk/models/update_campaign_assets_request.rb +253 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +55 -4
- data/openapi.yaml +2898 -733
- data/spec/api/ad_accounts_api_spec.rb +209 -10
- data/spec/api/ad_campaigns_api_spec.rb +99 -6
- data/spec/models/ad_creative_spec.rb +18 -0
- data/spec/models/{create_standalone_ad_request_tracking_spec.rb → ad_tracking_spec.rb} +6 -6
- data/spec/models/add_account_sitelinks201_response_sitelinks_inner_spec.rb +60 -0
- data/spec/models/add_account_sitelinks201_response_spec.rb +42 -0
- data/spec/models/add_account_sitelinks_request_spec.rb +48 -0
- data/spec/models/add_account_structured_snippets201_response_spec.rb +42 -0
- data/spec/models/add_account_structured_snippets201_response_structured_snippets_inner_spec.rb +52 -0
- data/spec/models/add_account_structured_snippets_request_spec.rb +48 -0
- data/spec/models/attach_ad_group_assets201_response_spec.rb +54 -0
- data/spec/models/create_ad_campaign200_response_spec.rb +68 -0
- data/spec/models/create_ad_campaign_request_spec.rb +28 -0
- data/spec/models/create_call_ad_request_spec.rb +6 -0
- data/spec/models/create_messaging_ad_request_spec.rb +6 -0
- data/spec/models/create_standalone_ad_request_additional_descriptions_inner_spec.rb +32 -0
- data/spec/models/create_standalone_ad_request_additional_headlines_inner_spec.rb +32 -0
- data/spec/models/create_standalone_ad_request_spec.rb +28 -0
- data/spec/models/ctwa_ad_request_body_spec.rb +6 -0
- data/spec/models/get_ad200_response_spec.rb +12 -0
- data/spec/models/get_ad_comments200_response_meta_spec.rb +19 -1
- data/spec/models/get_ios_fourteen_campaign_limits200_response_limits_spec.rb +48 -0
- data/spec/models/get_ios_fourteen_campaign_limits200_response_spec.rb +36 -0
- data/spec/models/google_asset_update_spec.rb +60 -0
- data/spec/models/google_rsa_description_spec.rb +46 -0
- data/spec/models/google_rsa_headline_spec.rb +46 -0
- data/spec/models/{attach_campaign_assets_request_sitelinks_inner_spec.rb → google_sitelink_spec.rb} +6 -6
- data/spec/models/{attach_campaign_assets_request_structured_snippets_inner_spec.rb → google_structured_snippet_spec.rb} +6 -6
- data/spec/models/hide_ad_comment200_response_spec.rb +52 -0
- data/spec/models/hide_ad_comment_request_spec.rb +36 -0
- data/spec/models/list_account_callouts200_response_callouts_inner_spec.rb +2 -2
- data/spec/models/{create_standalone_ad_request_promoted_object_spec.rb → list_account_sitelinks200_response_sitelinks_inner_spec.rb} +14 -32
- data/spec/models/list_account_sitelinks200_response_spec.rb +54 -0
- data/spec/models/list_account_structured_snippets200_response_spec.rb +54 -0
- data/spec/models/list_account_structured_snippets200_response_structured_snippets_inner_spec.rb +66 -0
- data/spec/models/list_ad_group_assets200_response_callouts_inner_spec.rb +48 -0
- data/spec/models/list_ad_group_assets200_response_sitelinks_inner_spec.rb +66 -0
- data/spec/models/list_ad_group_assets200_response_spec.rb +66 -0
- data/spec/models/list_ad_group_assets200_response_structured_snippets_inner_spec.rb +54 -0
- data/spec/models/list_ads_instagram_accounts200_response_accounts_inner_spec.rb +64 -0
- data/spec/models/list_ads_instagram_accounts200_response_pages_inner_spec.rb +54 -0
- data/spec/models/list_ads_instagram_accounts200_response_resolved_spec.rb +52 -0
- data/spec/models/list_ads_instagram_accounts200_response_spec.rb +48 -0
- data/spec/models/list_advertisable_applications200_response_applications_inner_spec.rb +54 -0
- data/spec/models/list_advertisable_applications200_response_spec.rb +36 -0
- data/spec/models/list_campaign_assets200_response_callouts_inner_spec.rb +48 -0
- data/spec/models/list_campaign_assets200_response_sitelinks_inner_spec.rb +66 -0
- data/spec/models/list_campaign_assets200_response_spec.rb +66 -0
- data/spec/models/list_campaign_assets200_response_structured_snippets_inner_spec.rb +54 -0
- data/spec/models/meta_instagram_identity_ref_spec.rb +48 -0
- data/spec/models/remove_ad_group_assets_request_spec.rb +54 -0
- data/spec/models/remove_campaign_assets200_response_spec.rb +36 -0
- data/spec/models/remove_campaign_assets_request_spec.rb +54 -0
- data/spec/models/reply_to_ad_comment200_response_spec.rb +46 -0
- data/spec/models/reply_to_ad_comment_request_spec.rb +36 -0
- data/spec/models/targeting_spec_spec.rb +12 -0
- data/spec/models/update_account_callouts200_response_spec.rb +42 -0
- data/spec/models/update_account_callouts_request_spec.rb +48 -0
- data/spec/models/update_account_callouts_request_updates_inner_callout_asset_spec.rb +36 -0
- data/spec/models/update_account_callouts_request_updates_inner_spec.rb +42 -0
- data/spec/models/update_account_sitelinks_request_spec.rb +48 -0
- data/spec/models/update_account_sitelinks_request_updates_inner_sitelink_asset_spec.rb +54 -0
- data/spec/models/update_account_sitelinks_request_updates_inner_spec.rb +48 -0
- data/spec/models/update_account_structured_snippets_request_spec.rb +48 -0
- data/spec/models/update_account_structured_snippets_request_updates_inner_spec.rb +42 -0
- data/spec/models/update_ad_request_spec.rb +18 -0
- data/spec/models/update_campaign_assets200_response_spec.rb +36 -0
- data/spec/models/update_campaign_assets_request_spec.rb +48 -0
- data/zernio-sdk-0.0.901.gem +0 -0
- metadata +222 -18
- data/docs/CreateStandaloneAdRequestPromotedObject.md +0 -38
- data/docs/CreateStandaloneAdRequestTracking.md +0 -20
- data/lib/zernio-sdk/models/create_standalone_ad_request_promoted_object.rb +0 -249
- 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`
|
|
18
|
-
class
|
|
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
|
|
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::
|
|
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::
|
|
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
|
|
18
|
+
# Zernio Google Ads connection id.
|
|
19
19
|
attr_accessor :account_id
|
|
20
20
|
|
|
21
|
-
#
|
|
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
|