Class: Zernio::AdTreeCampaign
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Zernio::AdTreeCampaign
- Defined in:
- lib/zernio-sdk/models/ad_tree_campaign.rb
Overview
Campaign with nested ad sets and rolled-up metrics
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#ad_count ⇒ Object
Total ads across all ad sets.
-
#ad_set_count ⇒ Object
Returns the value of attribute ad_set_count.
-
#ad_sets ⇒ Object
Returns the value of attribute ad_sets.
-
#advertising_channel_type ⇒ Object
Google-only.
-
#bid_amount ⇒ Object
Representative bid for the campaign, bubbled up from the top-spending ad set (whole currency units).
-
#bid_strategy ⇒ Object
Returns the value of attribute bid_strategy.
-
#budget ⇒ Object
Returns the value of attribute budget.
-
#budget_level ⇒ Object
Canonical CBO/ABO indicator.
-
#campaign_budget ⇒ Object
Returns the value of attribute campaign_budget.
-
#campaign_issues_info ⇒ Object
Platform-reported campaign issues (Meta
issues_info[]). -
#campaign_name ⇒ Object
Returns the value of attribute campaign_name.
-
#created_time ⇒ Object
Earliest
platformCreatedAt(platform ad creation time; falls back tocreatedAt, Zernio's sync time, for ads synced before that field existed) across every ad in the campaign. -
#currency ⇒ Object
ISO 4217 currency code (e.g. USD, EUR, CLP, JPY) for all budget amounts in this campaign node.
-
#daily ⇒ Object
Per-day metric series for this campaign.
-
#is_budget_schedule_enabled ⇒ Object
Meta-only.
-
#metrics ⇒ Object
Returns the value of attribute metrics.
-
#optimization_goal ⇒ Object
Returns the value of attribute optimization_goal.
-
#platform ⇒ Object
Returns the value of attribute platform.
-
#platform_ad_account_id ⇒ Object
Returns the value of attribute platform_ad_account_id.
-
#platform_ad_account_name ⇒ Object
Human-readable advertiser/account name from the platform.
-
#platform_campaign_id ⇒ Object
Returns the value of attribute platform_campaign_id.
-
#platform_campaign_status ⇒ Object
Raw platform-level campaign status (Meta
effective_status: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES). -
#platform_objective ⇒ Object
Raw Meta campaign objective (e.g. OUTCOME_SALES, OUTCOME_LEADS, OUTCOME_TRAFFIC).
-
#profile_id ⇒ Object
Returns the value of attribute profile_id.
-
#promoted_object ⇒ Object
Returns the value of attribute promoted_object.
-
#review_status ⇒ Object
Returns the value of attribute review_status.
-
#roas_average_floor ⇒ Object
Representative ROAS floor for the campaign — bubbled up from the top-spending ad set.
-
#status ⇒ Object
Delivery status derived from child ad statuses.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ AdTreeCampaign
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ AdTreeCampaign
Initializes the object
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 213 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdTreeCampaign` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdTreeCampaign`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'platform_campaign_id') self.platform_campaign_id = attributes[:'platform_campaign_id'] end if attributes.key?(:'platform') self.platform = attributes[:'platform'] end if attributes.key?(:'campaign_name') self.campaign_name = attributes[:'campaign_name'] end if attributes.key?(:'created_time') self.created_time = attributes[:'created_time'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'review_status') self.review_status = attributes[:'review_status'] end if attributes.key?(:'platform_campaign_status') self.platform_campaign_status = attributes[:'platform_campaign_status'] end if attributes.key?(:'campaign_issues_info') if (value = attributes[:'campaign_issues_info']).is_a?(Array) self.campaign_issues_info = value end end if attributes.key?(:'ad_count') self.ad_count = attributes[:'ad_count'] end if attributes.key?(:'ad_set_count') self.ad_set_count = attributes[:'ad_set_count'] end if attributes.key?(:'budget') self.budget = attributes[:'budget'] end if attributes.key?(:'campaign_budget') self.campaign_budget = attributes[:'campaign_budget'] end if attributes.key?(:'budget_level') self.budget_level = attributes[:'budget_level'] end if attributes.key?(:'is_budget_schedule_enabled') self.is_budget_schedule_enabled = attributes[:'is_budget_schedule_enabled'] else self.is_budget_schedule_enabled = false end if attributes.key?(:'currency') self.currency = attributes[:'currency'] end if attributes.key?(:'metrics') self.metrics = attributes[:'metrics'] end if attributes.key?(:'platform_ad_account_id') self.platform_ad_account_id = attributes[:'platform_ad_account_id'] end if attributes.key?(:'platform_ad_account_name') self.platform_ad_account_name = attributes[:'platform_ad_account_name'] end if attributes.key?(:'account_id') self.account_id = attributes[:'account_id'] end if attributes.key?(:'profile_id') self.profile_id = attributes[:'profile_id'] end if attributes.key?(:'advertising_channel_type') self.advertising_channel_type = attributes[:'advertising_channel_type'] end if attributes.key?(:'platform_objective') self.platform_objective = attributes[:'platform_objective'] end if attributes.key?(:'optimization_goal') self.optimization_goal = attributes[:'optimization_goal'] end if attributes.key?(:'bid_strategy') self.bid_strategy = attributes[:'bid_strategy'] end if attributes.key?(:'bid_amount') self.bid_amount = attributes[:'bid_amount'] end if attributes.key?(:'roas_average_floor') self.roas_average_floor = attributes[:'roas_average_floor'] end if attributes.key?(:'promoted_object') self.promoted_object = attributes[:'promoted_object'] end if attributes.key?(:'ad_sets') if (value = attributes[:'ad_sets']).is_a?(Array) self.ad_sets = value end end if attributes.key?(:'daily') if (value = attributes[:'daily']).is_a?(Array) self.daily = value end end end |
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
64 65 66 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 64 def account_id @account_id end |
#ad_count ⇒ Object
Total ads across all ad sets
40 41 42 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 40 def ad_count @ad_count end |
#ad_set_count ⇒ Object
Returns the value of attribute ad_set_count.
42 43 44 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 42 def ad_set_count @ad_set_count end |
#ad_sets ⇒ Object
Returns the value of attribute ad_sets.
86 87 88 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 86 def ad_sets @ad_sets end |
#advertising_channel_type ⇒ Object
Google-only. Raw campaign.advertising_channel_type (SEARCH, PERFORMANCE_MAX, LOCAL_SERVICES, VIDEO, DEMAND_GEN, DISPLAY, SHOPPING, ...). Serving surface, distinct from platformObjective (advertiser intent). Null/absent for non-Google platforms.
69 70 71 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 69 def advertising_channel_type @advertising_channel_type end |
#bid_amount ⇒ Object
Representative bid for the campaign, bubbled up from the top-spending ad set (whole currency units). Meta: populated when the ad-set bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP. LinkedIn: the campaign unitCost, which has no bidStrategy gate and where 0 is a real, delivery-stopping value rather than unset.
79 80 81 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 79 def bid_amount @bid_amount end |
#bid_strategy ⇒ Object
Returns the value of attribute bid_strategy.
76 77 78 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 76 def bid_strategy @bid_strategy end |
#budget ⇒ Object
Returns the value of attribute budget.
44 45 46 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 44 def budget @budget end |
#budget_level ⇒ Object
Canonical CBO/ABO indicator. campaign = CBO (Advantage Campaign Budget, budget lives on the campaign). adset = ABO (budget lives on each ad set). Route budget updates to the matching Meta entity.
49 50 51 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 49 def budget_level @budget_level end |
#campaign_budget ⇒ Object
Returns the value of attribute campaign_budget.
46 47 48 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 46 def campaign_budget @campaign_budget end |
#campaign_issues_info ⇒ Object
Platform-reported campaign issues (Meta issues_info[]). Populated only when the platform has delivery issues to report; contains the specific error codes and messages.
37 38 39 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 37 def campaign_issues_info @campaign_issues_info end |
#campaign_name ⇒ Object
Returns the value of attribute campaign_name.
23 24 25 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 23 def campaign_name @campaign_name end |
#created_time ⇒ Object
Earliest platformCreatedAt (platform ad creation time; falls back to createdAt, Zernio's sync time, for ads synced before that field existed) across every ad in the campaign. Not the platform campaign's own creation time (Meta's Campaign.created_time etc. is not synced) — a campaign created empty and populated later will show its first ad's time, not the campaign's. Usable for sorting "most recently created" without the numeric-campaign-id heuristic. Same source as AdTreeAdSet.createdTime and Ad.platformCreatedAt; mirrors AdCampaign.earliestAd.
26 27 28 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 26 def created_time @created_time end |
#currency ⇒ Object
ISO 4217 currency code (e.g. USD, EUR, CLP, JPY) for all budget amounts in this campaign node. Budgets are NOT normalized to USD.
55 56 57 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 55 def currency @currency end |
#daily ⇒ Object
Per-day metric series for this campaign. Present only when GET /v1/ads/tree is called with timeIncrement=1 (any dailyLevel). This is the per-campaign daily trend — summing its additive fields reproduces the campaign metrics total, except reach: on Meta the range total is de-duplicated, so daily reach does not sum to it.
89 90 91 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 89 def daily @daily end |
#is_budget_schedule_enabled ⇒ Object
Meta-only. Mirrors Campaign.is_budget_schedule_enabled — true when the campaign uses budget scheduling (time-based budget changes). Independent of CBO/ABO.
52 53 54 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 52 def is_budget_schedule_enabled @is_budget_schedule_enabled end |
#metrics ⇒ Object
Returns the value of attribute metrics.
57 58 59 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 57 def metrics @metrics end |
#optimization_goal ⇒ Object
Returns the value of attribute optimization_goal.
74 75 76 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 74 def optimization_goal @optimization_goal end |
#platform ⇒ Object
Returns the value of attribute platform.
21 22 23 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 21 def platform @platform end |
#platform_ad_account_id ⇒ Object
Returns the value of attribute platform_ad_account_id.
59 60 61 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 59 def platform_ad_account_id @platform_ad_account_id end |
#platform_ad_account_name ⇒ Object
Human-readable advertiser/account name from the platform. Refreshed on every sync.
62 63 64 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 62 def platform_ad_account_name @platform_ad_account_name end |
#platform_campaign_id ⇒ Object
Returns the value of attribute platform_campaign_id.
19 20 21 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 19 def platform_campaign_id @platform_campaign_id end |
#platform_campaign_status ⇒ Object
Raw platform-level campaign status (Meta effective_status: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES). Distinct from per-ad platformStatus.
34 35 36 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 34 def platform_campaign_status @platform_campaign_status end |
#platform_objective ⇒ Object
Raw Meta campaign objective (e.g. OUTCOME_SALES, OUTCOME_LEADS, OUTCOME_TRAFFIC)
72 73 74 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 72 def platform_objective @platform_objective end |
#profile_id ⇒ Object
Returns the value of attribute profile_id.
66 67 68 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 66 def profile_id @profile_id end |
#promoted_object ⇒ Object
Returns the value of attribute promoted_object.
84 85 86 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 84 def promoted_object @promoted_object end |
#review_status ⇒ Object
Returns the value of attribute review_status.
31 32 33 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 31 def review_status @review_status end |
#roas_average_floor ⇒ Object
Representative ROAS floor for the campaign — bubbled up from the top-spending ad set. Decimal multiplier (2.0 = 2.0x).
82 83 84 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 82 def roas_average_floor @roas_average_floor end |
#status ⇒ Object
Delivery status derived from child ad statuses. Distinct from reviewStatus, which reflects the platform-side review state.
29 30 31 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 29 def status @status end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
149 150 151 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 149 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
154 155 156 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 154 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 114 def self.attribute_map { :'platform_campaign_id' => :'platformCampaignId', :'platform' => :'platform', :'campaign_name' => :'campaignName', :'created_time' => :'createdTime', :'status' => :'status', :'review_status' => :'reviewStatus', :'platform_campaign_status' => :'platformCampaignStatus', :'campaign_issues_info' => :'campaignIssuesInfo', :'ad_count' => :'adCount', :'ad_set_count' => :'adSetCount', :'budget' => :'budget', :'campaign_budget' => :'campaignBudget', :'budget_level' => :'budgetLevel', :'is_budget_schedule_enabled' => :'isBudgetScheduleEnabled', :'currency' => :'currency', :'metrics' => :'metrics', :'platform_ad_account_id' => :'platformAdAccountId', :'platform_ad_account_name' => :'platformAdAccountName', :'account_id' => :'accountId', :'profile_id' => :'profileId', :'advertising_channel_type' => :'advertisingChannelType', :'platform_objective' => :'platformObjective', :'optimization_goal' => :'optimizationGoal', :'bid_strategy' => :'bidStrategy', :'bid_amount' => :'bidAmount', :'roas_average_floor' => :'roasAverageFloor', :'promoted_object' => :'promotedObject', :'ad_sets' => :'adSets', :'daily' => :'daily' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 442 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 194 def self.openapi_nullable Set.new([ :'created_time', :'review_status', :'platform_campaign_status', :'campaign_issues_info', :'budget_level', :'currency', :'platform_ad_account_name', :'advertising_channel_type', :'platform_objective', :'bid_strategy', :'bid_amount', :'roas_average_floor', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 159 def self.openapi_types { :'platform_campaign_id' => :'String', :'platform' => :'String', :'campaign_name' => :'String', :'created_time' => :'Time', :'status' => :'AdStatus', :'review_status' => :'AdReviewStatus', :'platform_campaign_status' => :'String', :'campaign_issues_info' => :'Array<Object>', :'ad_count' => :'Integer', :'ad_set_count' => :'Integer', :'budget' => :'AdTreeCampaignBudget', :'campaign_budget' => :'AdTreeCampaignCampaignBudget', :'budget_level' => :'String', :'is_budget_schedule_enabled' => :'Boolean', :'currency' => :'String', :'metrics' => :'AdMetrics', :'platform_ad_account_id' => :'String', :'platform_ad_account_name' => :'String', :'account_id' => :'String', :'profile_id' => :'String', :'advertising_channel_type' => :'String', :'platform_objective' => :'String', :'optimization_goal' => :'AdTreeCampaignOptimizationGoal', :'bid_strategy' => :'BidStrategy', :'bid_amount' => :'Float', :'roas_average_floor' => :'Float', :'promoted_object' => :'AdTreeCampaignPromotedObject', :'ad_sets' => :'Array<AdTreeAdSet>', :'daily' => :'Array<AdDailyMetrics>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 393 def ==(o) return true if self.equal?(o) self.class == o.class && platform_campaign_id == o.platform_campaign_id && platform == o.platform && campaign_name == o.campaign_name && created_time == o.created_time && status == o.status && review_status == o.review_status && platform_campaign_status == o.platform_campaign_status && campaign_issues_info == o.campaign_issues_info && ad_count == o.ad_count && ad_set_count == o.ad_set_count && budget == o.budget && campaign_budget == o.campaign_budget && budget_level == o.budget_level && is_budget_schedule_enabled == o.is_budget_schedule_enabled && currency == o.currency && metrics == o.metrics && platform_ad_account_id == o.platform_ad_account_id && platform_ad_account_name == o.platform_ad_account_name && account_id == o.account_id && profile_id == o.profile_id && advertising_channel_type == o.advertising_channel_type && platform_objective == o.platform_objective && optimization_goal == o.optimization_goal && bid_strategy == o.bid_strategy && bid_amount == o.bid_amount && roas_average_floor == o.roas_average_floor && promoted_object == o.promoted_object && ad_sets == o.ad_sets && daily == o.daily end |
#eql?(o) ⇒ Boolean
429 430 431 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 429 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
435 436 437 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 435 def hash [platform_campaign_id, platform, campaign_name, created_time, status, review_status, platform_campaign_status, campaign_issues_info, ad_count, ad_set_count, budget, campaign_budget, budget_level, is_budget_schedule_enabled, currency, metrics, platform_ad_account_id, platform_ad_account_name, account_id, profile_id, advertising_channel_type, platform_objective, optimization_goal, bid_strategy, bid_amount, roas_average_floor, promoted_object, ad_sets, daily].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
354 355 356 357 358 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 354 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
464 465 466 467 468 469 470 471 472 473 474 475 476 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 464 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
362 363 364 365 366 367 368 369 |
# File 'lib/zernio-sdk/models/ad_tree_campaign.rb', line 362 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"]) return false unless platform_validator.valid?(@platform) budget_level_validator = EnumAttributeValidator.new('String', ["campaign", "adset"]) return false unless budget_level_validator.valid?(@budget_level) true end |