late-sdk 0.0.628 → 0.0.630
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 +1 -0
- data/docs/AdCampaignsApi.md +27 -13
- data/docs/AdDailyMetrics.md +1 -1
- data/docs/AdMetrics.md +1 -1
- data/docs/CreateAdCampaignRequest.md +7 -1
- data/docs/CreateStandaloneAdRequest.md +4 -0
- data/docs/CreateStandaloneAdRequestTranslationsInner.md +30 -0
- data/docs/CreateStandaloneAdRequestVideo.md +3 -1
- data/docs/GetAdsTimeline200ResponseRowsInner.md +1 -1
- data/docs/GetCampaignAnalytics200ResponseAnalyticsDailyInner.md +1 -1
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +30 -2
- data/lib/zernio-sdk/models/ad_daily_metrics.rb +2 -2
- data/lib/zernio-sdk/models/ad_metrics.rb +2 -2
- data/lib/zernio-sdk/models/create_ad_campaign_request.rb +46 -4
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +51 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request_translations_inner.rb +263 -0
- data/lib/zernio-sdk/models/create_standalone_ad_request_video.rb +12 -19
- data/lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb +2 -2
- data/lib/zernio-sdk/models/get_campaign_analytics200_response_analytics_daily_inner.rb +2 -2
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +95 -5
- data/spec/api/ad_campaigns_api_spec.rb +5 -1
- data/spec/models/create_ad_campaign_request_spec.rb +22 -0
- data/spec/models/create_standalone_ad_request_spec.rb +12 -0
- data/spec/models/create_standalone_ad_request_translations_inner_spec.rb +72 -0
- data/spec/models/create_standalone_ad_request_video_spec.rb +6 -0
- data/zernio-sdk-0.0.630.gem +0 -0
- metadata +6 -2
- data/zernio-sdk-0.0.628.gem +0 -0
|
@@ -181,6 +181,12 @@ module Zernio
|
|
|
181
181
|
# Meta only. Hand-built carousel: 2-10 authored cards in DETERMINISTIC order, mapped to the creative's `link_data.child_attachments`. Unlike `dynamicCreative`, you control the card order and per-card copy/link. Requires top-level `body`, `linkUrl` and `callToAction`. Mutually exclusive with `imageUrl`/`video`, `creatives[]`, `dynamicCreative`, `placementAssets`, `existingCreativeId`, `adSetId`, `leadGenFormId` and goal `catalog_sales`.
|
|
182
182
|
attr_accessor :carousel_cards
|
|
183
183
|
|
|
184
|
+
# Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own.
|
|
185
|
+
attr_accessor :default_locale
|
|
186
|
+
|
|
187
|
+
# Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying per-locale copy and, optionally, per-locale media — the \"Languages\" toggle in Ads Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of splitting it across one ad per language. The ad's top-level copy and media are the DEFAULT every unlisted locale falls back to, and a variant inherits any field it omits, so send only what differs per language. Media shared across languages is uploaded once. Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards` and `existingCreativeId` — Meta allows one `asset_feed_spec` shape per creative.
|
|
188
|
+
attr_accessor :translations
|
|
189
|
+
|
|
184
190
|
attr_accessor :placement_assets
|
|
185
191
|
|
|
186
192
|
# Custom audience ID for targeting
|
|
@@ -315,6 +321,8 @@ module Zernio
|
|
|
315
321
|
:'instagram_account_id' => :'instagramAccountId',
|
|
316
322
|
:'dynamic_creative' => :'dynamicCreative',
|
|
317
323
|
:'carousel_cards' => :'carouselCards',
|
|
324
|
+
:'default_locale' => :'defaultLocale',
|
|
325
|
+
:'translations' => :'translations',
|
|
318
326
|
:'placement_assets' => :'placementAssets',
|
|
319
327
|
:'audience_id' => :'audienceId',
|
|
320
328
|
:'campaign_type' => :'campaignType',
|
|
@@ -408,6 +416,8 @@ module Zernio
|
|
|
408
416
|
:'instagram_account_id' => :'String',
|
|
409
417
|
:'dynamic_creative' => :'CreateStandaloneAdRequestDynamicCreative',
|
|
410
418
|
:'carousel_cards' => :'Array<CreateStandaloneAdRequestCarouselCardsInner>',
|
|
419
|
+
:'default_locale' => :'String',
|
|
420
|
+
:'translations' => :'Array<CreateStandaloneAdRequestTranslationsInner>',
|
|
411
421
|
:'placement_assets' => :'CreateStandaloneAdRequestPlacementAssets',
|
|
412
422
|
:'audience_id' => :'String',
|
|
413
423
|
:'campaign_type' => :'String',
|
|
@@ -725,6 +735,16 @@ module Zernio
|
|
|
725
735
|
end
|
|
726
736
|
end
|
|
727
737
|
|
|
738
|
+
if attributes.key?(:'default_locale')
|
|
739
|
+
self.default_locale = attributes[:'default_locale']
|
|
740
|
+
end
|
|
741
|
+
|
|
742
|
+
if attributes.key?(:'translations')
|
|
743
|
+
if (value = attributes[:'translations']).is_a?(Array)
|
|
744
|
+
self.translations = value
|
|
745
|
+
end
|
|
746
|
+
end
|
|
747
|
+
|
|
728
748
|
if attributes.key?(:'placement_assets')
|
|
729
749
|
self.placement_assets = attributes[:'placement_assets']
|
|
730
750
|
end
|
|
@@ -883,6 +903,14 @@ module Zernio
|
|
|
883
903
|
invalid_properties.push('invalid value for "carousel_cards", number of items must be greater than or equal to 2.')
|
|
884
904
|
end
|
|
885
905
|
|
|
906
|
+
if !@translations.nil? && @translations.length > 10
|
|
907
|
+
invalid_properties.push('invalid value for "translations", number of items must be less than or equal to 10.')
|
|
908
|
+
end
|
|
909
|
+
|
|
910
|
+
if !@translations.nil? && @translations.length < 1
|
|
911
|
+
invalid_properties.push('invalid value for "translations", number of items must be greater than or equal to 1.')
|
|
912
|
+
end
|
|
913
|
+
|
|
886
914
|
if !@attribution_spec.nil? && @attribution_spec.length > 3
|
|
887
915
|
invalid_properties.push('invalid value for "attribution_spec", number of items must be less than or equal to 3.')
|
|
888
916
|
end
|
|
@@ -937,6 +965,8 @@ module Zernio
|
|
|
937
965
|
return false unless income_tier_validator.valid?(@income_tier)
|
|
938
966
|
return false if !@carousel_cards.nil? && @carousel_cards.length > 10
|
|
939
967
|
return false if !@carousel_cards.nil? && @carousel_cards.length < 2
|
|
968
|
+
return false if !@translations.nil? && @translations.length > 10
|
|
969
|
+
return false if !@translations.nil? && @translations.length < 1
|
|
940
970
|
campaign_type_validator = EnumAttributeValidator.new('String', ["display", "search"])
|
|
941
971
|
return false unless campaign_type_validator.valid?(@campaign_type)
|
|
942
972
|
advantage_audience_validator = EnumAttributeValidator.new('Integer', [0, 1])
|
|
@@ -1208,6 +1238,24 @@ module Zernio
|
|
|
1208
1238
|
@carousel_cards = carousel_cards
|
|
1209
1239
|
end
|
|
1210
1240
|
|
|
1241
|
+
# Custom attribute writer method with validation
|
|
1242
|
+
# @param [Object] translations Value to be assigned
|
|
1243
|
+
def translations=(translations)
|
|
1244
|
+
if translations.nil?
|
|
1245
|
+
fail ArgumentError, 'translations cannot be nil'
|
|
1246
|
+
end
|
|
1247
|
+
|
|
1248
|
+
if translations.length > 10
|
|
1249
|
+
fail ArgumentError, 'invalid value for "translations", number of items must be less than or equal to 10.'
|
|
1250
|
+
end
|
|
1251
|
+
|
|
1252
|
+
if translations.length < 1
|
|
1253
|
+
fail ArgumentError, 'invalid value for "translations", number of items must be greater than or equal to 1.'
|
|
1254
|
+
end
|
|
1255
|
+
|
|
1256
|
+
@translations = translations
|
|
1257
|
+
end
|
|
1258
|
+
|
|
1211
1259
|
# Custom attribute writer method checking allowed values (enum).
|
|
1212
1260
|
# @param [Object] campaign_type Object to be assigned
|
|
1213
1261
|
def campaign_type=(campaign_type)
|
|
@@ -1358,6 +1406,8 @@ module Zernio
|
|
|
1358
1406
|
instagram_account_id == o.instagram_account_id &&
|
|
1359
1407
|
dynamic_creative == o.dynamic_creative &&
|
|
1360
1408
|
carousel_cards == o.carousel_cards &&
|
|
1409
|
+
default_locale == o.default_locale &&
|
|
1410
|
+
translations == o.translations &&
|
|
1361
1411
|
placement_assets == o.placement_assets &&
|
|
1362
1412
|
audience_id == o.audience_id &&
|
|
1363
1413
|
campaign_type == o.campaign_type &&
|
|
@@ -1387,7 +1437,7 @@ module Zernio
|
|
|
1387
1437
|
# Calculates hash code according to all attributes.
|
|
1388
1438
|
# @return [Integer] Hash code
|
|
1389
1439
|
def hash
|
|
1390
|
-
[account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, creative_features, validate_only, budget_amount, budget_type, status, budget_level, currency, headline, long_headline, body, description, call_to_action, link_url, lead_gen_form_id, image_url, images, video, creatives, ad_set_id, existing_campaign_id, existing_creative_id, business_name, board_id, organization_id, targeting, countries, cities, regions, age_min, age_max, interests, zips, metros, custom_locations, behaviors, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, special_ad_category_country, end_date, start_date, instagram_account_id, dynamic_creative, carousel_cards, placement_assets, audience_id, campaign_type, keywords, additional_headlines, additional_descriptions, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, promoted_object].hash
|
|
1440
|
+
[account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, creative_features, validate_only, budget_amount, budget_type, status, budget_level, currency, headline, long_headline, body, description, call_to_action, link_url, lead_gen_form_id, image_url, images, video, creatives, ad_set_id, existing_campaign_id, existing_creative_id, business_name, board_id, organization_id, targeting, countries, cities, regions, age_min, age_max, interests, zips, metros, custom_locations, behaviors, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, special_ad_category_country, end_date, start_date, instagram_account_id, dynamic_creative, carousel_cards, default_locale, translations, placement_assets, audience_id, campaign_type, keywords, additional_headlines, additional_descriptions, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, promoted_object].hash
|
|
1391
1441
|
end
|
|
1392
1442
|
|
|
1393
1443
|
# Builds the object from hash
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.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 CreateStandaloneAdRequestTranslationsInner < ApiModelBase
|
|
18
|
+
# Language code, resolved to Meta's numeric locale id. Bare codes target the '(All)' umbrella (`es` = every Spanish variant); region-qualified codes target the variant (`pt_BR`, `en_GB`).
|
|
19
|
+
attr_accessor :locale
|
|
20
|
+
|
|
21
|
+
# Headline for this language. Inherits the top-level `headline` when omitted.
|
|
22
|
+
attr_accessor :headline
|
|
23
|
+
|
|
24
|
+
# Primary text for this language. Inherits the top-level `body` when omitted.
|
|
25
|
+
attr_accessor :body
|
|
26
|
+
|
|
27
|
+
# Link description for this language. Inherits the top-level `description` when omitted.
|
|
28
|
+
attr_accessor :description
|
|
29
|
+
|
|
30
|
+
# Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video.
|
|
31
|
+
attr_accessor :image_url
|
|
32
|
+
|
|
33
|
+
# Video for this language. Inherits the ad's `video.url` when omitted. The feed is all-image OR all-video.
|
|
34
|
+
attr_accessor :video_url
|
|
35
|
+
|
|
36
|
+
# Poster frame for this language's video.
|
|
37
|
+
attr_accessor :thumbnail_url
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
:'locale' => :'locale',
|
|
43
|
+
:'headline' => :'headline',
|
|
44
|
+
:'body' => :'body',
|
|
45
|
+
:'description' => :'description',
|
|
46
|
+
:'image_url' => :'imageUrl',
|
|
47
|
+
:'video_url' => :'videoUrl',
|
|
48
|
+
:'thumbnail_url' => :'thumbnailUrl'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns attribute mapping this model knows about
|
|
53
|
+
def self.acceptable_attribute_map
|
|
54
|
+
attribute_map
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns all the JSON keys this model knows about
|
|
58
|
+
def self.acceptable_attributes
|
|
59
|
+
acceptable_attribute_map.values
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Attribute type mapping.
|
|
63
|
+
def self.openapi_types
|
|
64
|
+
{
|
|
65
|
+
:'locale' => :'String',
|
|
66
|
+
:'headline' => :'String',
|
|
67
|
+
:'body' => :'String',
|
|
68
|
+
:'description' => :'String',
|
|
69
|
+
:'image_url' => :'String',
|
|
70
|
+
:'video_url' => :'String',
|
|
71
|
+
:'thumbnail_url' => :'String'
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# List of attributes with nullable: true
|
|
76
|
+
def self.openapi_nullable
|
|
77
|
+
Set.new([
|
|
78
|
+
])
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Initializes the object
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
def initialize(attributes = {})
|
|
84
|
+
if (!attributes.is_a?(Hash))
|
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateStandaloneAdRequestTranslationsInner` initialize method"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
90
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
91
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
92
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateStandaloneAdRequestTranslationsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
93
|
+
end
|
|
94
|
+
h[k.to_sym] = v
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'locale')
|
|
98
|
+
self.locale = attributes[:'locale']
|
|
99
|
+
else
|
|
100
|
+
self.locale = nil
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'headline')
|
|
104
|
+
self.headline = attributes[:'headline']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'body')
|
|
108
|
+
self.body = attributes[:'body']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'description')
|
|
112
|
+
self.description = attributes[:'description']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'image_url')
|
|
116
|
+
self.image_url = attributes[:'image_url']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'video_url')
|
|
120
|
+
self.video_url = attributes[:'video_url']
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'thumbnail_url')
|
|
124
|
+
self.thumbnail_url = attributes[:'thumbnail_url']
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
129
|
+
# @return Array for valid properties with the reasons
|
|
130
|
+
def list_invalid_properties
|
|
131
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
132
|
+
invalid_properties = Array.new
|
|
133
|
+
if @locale.nil?
|
|
134
|
+
invalid_properties.push('invalid value for "locale", locale cannot be nil.')
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if !@headline.nil? && @headline.to_s.length > 255
|
|
138
|
+
invalid_properties.push('invalid value for "headline", the character length must be smaller than or equal to 255.')
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if !@description.nil? && @description.to_s.length > 255
|
|
142
|
+
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 255.')
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
invalid_properties
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Check to see if the all the properties in the model are valid
|
|
149
|
+
# @return true if the model is valid
|
|
150
|
+
def valid?
|
|
151
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
152
|
+
return false if @locale.nil?
|
|
153
|
+
return false if !@headline.nil? && @headline.to_s.length > 255
|
|
154
|
+
return false if !@description.nil? && @description.to_s.length > 255
|
|
155
|
+
true
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Custom attribute writer method with validation
|
|
159
|
+
# @param [Object] locale Value to be assigned
|
|
160
|
+
def locale=(locale)
|
|
161
|
+
if locale.nil?
|
|
162
|
+
fail ArgumentError, 'locale cannot be nil'
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
@locale = locale
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Custom attribute writer method with validation
|
|
169
|
+
# @param [Object] headline Value to be assigned
|
|
170
|
+
def headline=(headline)
|
|
171
|
+
if headline.nil?
|
|
172
|
+
fail ArgumentError, 'headline cannot be nil'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if headline.to_s.length > 255
|
|
176
|
+
fail ArgumentError, 'invalid value for "headline", the character length must be smaller than or equal to 255.'
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
@headline = headline
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Custom attribute writer method with validation
|
|
183
|
+
# @param [Object] description Value to be assigned
|
|
184
|
+
def description=(description)
|
|
185
|
+
if description.nil?
|
|
186
|
+
fail ArgumentError, 'description cannot be nil'
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if description.to_s.length > 255
|
|
190
|
+
fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 255.'
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
@description = description
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Checks equality by comparing each attribute.
|
|
197
|
+
# @param [Object] Object to be compared
|
|
198
|
+
def ==(o)
|
|
199
|
+
return true if self.equal?(o)
|
|
200
|
+
self.class == o.class &&
|
|
201
|
+
locale == o.locale &&
|
|
202
|
+
headline == o.headline &&
|
|
203
|
+
body == o.body &&
|
|
204
|
+
description == o.description &&
|
|
205
|
+
image_url == o.image_url &&
|
|
206
|
+
video_url == o.video_url &&
|
|
207
|
+
thumbnail_url == o.thumbnail_url
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# @see the `==` method
|
|
211
|
+
# @param [Object] Object to be compared
|
|
212
|
+
def eql?(o)
|
|
213
|
+
self == o
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Calculates hash code according to all attributes.
|
|
217
|
+
# @return [Integer] Hash code
|
|
218
|
+
def hash
|
|
219
|
+
[locale, headline, body, description, image_url, video_url, thumbnail_url].hash
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Builds the object from hash
|
|
223
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
224
|
+
# @return [Object] Returns the model itself
|
|
225
|
+
def self.build_from_hash(attributes)
|
|
226
|
+
return nil unless attributes.is_a?(Hash)
|
|
227
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
228
|
+
transformed_hash = {}
|
|
229
|
+
openapi_types.each_pair do |key, type|
|
|
230
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
231
|
+
transformed_hash["#{key}"] = nil
|
|
232
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
233
|
+
# check to ensure the input is an array given that the attribute
|
|
234
|
+
# is documented as an array but the input is not
|
|
235
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
236
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
237
|
+
end
|
|
238
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
239
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
new(transformed_hash)
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Returns the object in the form of hash
|
|
246
|
+
# @return [Hash] Returns the object in the form of hash
|
|
247
|
+
def to_hash
|
|
248
|
+
hash = {}
|
|
249
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
250
|
+
value = self.send(attr)
|
|
251
|
+
if value.nil?
|
|
252
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
253
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
hash[param] = _to_hash(value)
|
|
257
|
+
end
|
|
258
|
+
hash
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
end
|
|
@@ -16,9 +16,12 @@ require 'time'
|
|
|
16
16
|
module Zernio
|
|
17
17
|
# Meta (facebook, instagram) and LinkedIn. When set, creates a VIDEO ad on the legacy (or, for Meta, attach) shape. Mutually exclusive with `imageUrl`. For Meta multi-creative, set `video` per entry inside `creatives[]` instead. For LinkedIn the video is uploaded to LinkedIn under the authoring Company Page (see `organizationId`) and the campaign format is set to SINGLE_VIDEO; LinkedIn ignores `thumbnailUrl` (it auto-generates the poster frame) — supply MP4 H.264/AAC, 3s-30min, 75KB-500MB.
|
|
18
18
|
class CreateStandaloneAdRequestVideo < ApiModelBase
|
|
19
|
-
# Public URL of the video. Meta: uploaded via chunked transfer on /act_X/advideos, then the request blocks on Meta's transcoding until status.video_status === 'ready'. LinkedIn: uploaded via the Videos API (multipart), then the request blocks until LinkedIn finishes transcoding (status AVAILABLE) — short clips take ~10-30s.
|
|
19
|
+
# Public URL of the video. Meta: uploaded via chunked transfer on /act_X/advideos, then the request blocks on Meta's transcoding until status.video_status === 'ready'. LinkedIn: uploaded via the Videos API (multipart), then the request blocks until LinkedIn finishes transcoding (status AVAILABLE) — short clips take ~10-30s. Provide either `url` or `id`.
|
|
20
20
|
attr_accessor :url
|
|
21
21
|
|
|
22
|
+
# Meta only. Reuse a video ALREADY uploaded to this ad account instead of re-uploading the file: pass the `videoId` returned by a previous create. Wins over `url`, so N ads that differ only in copy share one upload (`existingCreativeId` only covers the identical-copy case). Provide either `url` or `id`.
|
|
23
|
+
attr_accessor :id
|
|
24
|
+
|
|
22
25
|
# Public URL of a still-image thumbnail for the video. OPTIONAL: when omitted on Meta, the poster is auto-generated from Meta's own preferred video thumbnail (the same candidates Ads Manager shows), so video ads publish without supplying one. Provide it to control the poster frame exactly (uploaded as an ad image and referenced in object_story_spec.video_data). Ignored by LinkedIn (auto-generated poster frame).
|
|
23
26
|
attr_accessor :thumbnail_url
|
|
24
27
|
|
|
@@ -26,6 +29,7 @@ module Zernio
|
|
|
26
29
|
def self.attribute_map
|
|
27
30
|
{
|
|
28
31
|
:'url' => :'url',
|
|
32
|
+
:'id' => :'id',
|
|
29
33
|
:'thumbnail_url' => :'thumbnailUrl'
|
|
30
34
|
}
|
|
31
35
|
end
|
|
@@ -44,6 +48,7 @@ module Zernio
|
|
|
44
48
|
def self.openapi_types
|
|
45
49
|
{
|
|
46
50
|
:'url' => :'String',
|
|
51
|
+
:'id' => :'String',
|
|
47
52
|
:'thumbnail_url' => :'String'
|
|
48
53
|
}
|
|
49
54
|
end
|
|
@@ -72,8 +77,10 @@ module Zernio
|
|
|
72
77
|
|
|
73
78
|
if attributes.key?(:'url')
|
|
74
79
|
self.url = attributes[:'url']
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'id')
|
|
83
|
+
self.id = attributes[:'id']
|
|
77
84
|
end
|
|
78
85
|
|
|
79
86
|
if attributes.key?(:'thumbnail_url')
|
|
@@ -86,10 +93,6 @@ module Zernio
|
|
|
86
93
|
def list_invalid_properties
|
|
87
94
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
88
95
|
invalid_properties = Array.new
|
|
89
|
-
if @url.nil?
|
|
90
|
-
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
91
|
-
end
|
|
92
|
-
|
|
93
96
|
invalid_properties
|
|
94
97
|
end
|
|
95
98
|
|
|
@@ -97,26 +100,16 @@ module Zernio
|
|
|
97
100
|
# @return true if the model is valid
|
|
98
101
|
def valid?
|
|
99
102
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
100
|
-
return false if @url.nil?
|
|
101
103
|
true
|
|
102
104
|
end
|
|
103
105
|
|
|
104
|
-
# Custom attribute writer method with validation
|
|
105
|
-
# @param [Object] url Value to be assigned
|
|
106
|
-
def url=(url)
|
|
107
|
-
if url.nil?
|
|
108
|
-
fail ArgumentError, 'url cannot be nil'
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
@url = url
|
|
112
|
-
end
|
|
113
|
-
|
|
114
106
|
# Checks equality by comparing each attribute.
|
|
115
107
|
# @param [Object] Object to be compared
|
|
116
108
|
def ==(o)
|
|
117
109
|
return true if self.equal?(o)
|
|
118
110
|
self.class == o.class &&
|
|
119
111
|
url == o.url &&
|
|
112
|
+
id == o.id &&
|
|
120
113
|
thumbnail_url == o.thumbnail_url
|
|
121
114
|
end
|
|
122
115
|
|
|
@@ -129,7 +122,7 @@ module Zernio
|
|
|
129
122
|
# Calculates hash code according to all attributes.
|
|
130
123
|
# @return [Integer] Hash code
|
|
131
124
|
def hash
|
|
132
|
-
[url, thumbnail_url].hash
|
|
125
|
+
[url, id, thumbnail_url].hash
|
|
133
126
|
end
|
|
134
127
|
|
|
135
128
|
# Builds the object from hash
|
|
@@ -37,7 +37,7 @@ module Zernio
|
|
|
37
37
|
# Cost per 1000 impressions in native currency.
|
|
38
38
|
attr_accessor :cpm
|
|
39
39
|
|
|
40
|
-
# Sum of conversion events over the range. Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07).
|
|
40
|
+
# Sum of conversion events over the range. Fractional values are normal (attribution splitting + Google modeled conversions). Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07).
|
|
41
41
|
attr_accessor :conversions
|
|
42
42
|
|
|
43
43
|
attr_accessor :cost_per_conversion
|
|
@@ -97,7 +97,7 @@ module Zernio
|
|
|
97
97
|
:'ctr' => :'Float',
|
|
98
98
|
:'cpc' => :'Float',
|
|
99
99
|
:'cpm' => :'Float',
|
|
100
|
-
:'conversions' => :'
|
|
100
|
+
:'conversions' => :'Float',
|
|
101
101
|
:'cost_per_conversion' => :'Float',
|
|
102
102
|
:'actions' => :'Hash<String, Float>',
|
|
103
103
|
:'action_values' => :'Hash<String, Float>',
|
|
@@ -34,7 +34,7 @@ module Zernio
|
|
|
34
34
|
|
|
35
35
|
attr_accessor :engagement
|
|
36
36
|
|
|
37
|
-
# Count of conversion events over the requested date range. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
|
|
37
|
+
# Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
|
|
38
38
|
attr_accessor :conversions
|
|
39
39
|
|
|
40
40
|
# Derived spend / conversions in the same currency as spend. 0 when conversions is 0.
|
|
@@ -136,7 +136,7 @@ module Zernio
|
|
|
136
136
|
:'cpc' => :'Float',
|
|
137
137
|
:'cpm' => :'Float',
|
|
138
138
|
:'engagement' => :'Integer',
|
|
139
|
-
:'conversions' => :'
|
|
139
|
+
:'conversions' => :'Float',
|
|
140
140
|
:'cost_per_conversion' => :'Float',
|
|
141
141
|
:'actions' => :'Hash<String, Integer>',
|
|
142
142
|
:'action_values' => :'Hash<String, Float>',
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -276,6 +276,7 @@ require 'zernio-sdk/models/create_standalone_ad_request_placements'
|
|
|
276
276
|
require 'zernio-sdk/models/create_standalone_ad_request_promoted_object'
|
|
277
277
|
require 'zernio-sdk/models/create_standalone_ad_request_regions_inner'
|
|
278
278
|
require 'zernio-sdk/models/create_standalone_ad_request_tracking'
|
|
279
|
+
require 'zernio-sdk/models/create_standalone_ad_request_translations_inner'
|
|
279
280
|
require 'zernio-sdk/models/create_standalone_ad_request_video'
|
|
280
281
|
require 'zernio-sdk/models/create_test_lead200_response'
|
|
281
282
|
require 'zernio-sdk/models/create_test_lead200_response_test_lead'
|