Class: PinterestSdkClient::AdGroupUpdate
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- PinterestSdkClient::AdGroupUpdate
- Defined in:
- lib/pinterest_sdk/models/ad_group_update.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#ad_account_id ⇒ Object
Advertiser ID.
-
#auto_targeting_enabled ⇒ Object
Enable auto-targeting for ad group.
-
#bid_in_micro_currency ⇒ Object
Bid price in micro currency.
-
#bid_multiplier ⇒ Object
Open beta Bid multiplier for ad group.
-
#bid_strategy_type ⇒ Object
Returns the value of attribute bid_strategy_type.
-
#billable_event ⇒ Object
Returns the value of attribute billable_event.
-
#budget_in_micro_currency ⇒ Object
Budget in micro currency.
-
#budget_type ⇒ Object
Returns the value of attribute budget_type.
-
#campaign_id ⇒ Object
Campaign ID of the ad group.
-
#conversion_learning_mode_type ⇒ Object
oCPM learn mode.
-
#created_time ⇒ Object
Ad group creation time.
-
#customer_segment_id ⇒ Object
Customer segment ID applied to the ad group.
-
#dca_assets ⇒ Object
[DCA] The Dynamic creative assets to use for DCA.
-
#end_time ⇒ Object
Timestamp in Unix format for scheduling when ads in the ad group stop appearing.
-
#ext_features ⇒ Object
Returns the value of attribute ext_features.
-
#feed_profile_id ⇒ Object
Feed Profile ID associated to the adgroup.
-
#id ⇒ Object
Ad group ID.
-
#is_creative_optimization ⇒ Object
Enable creative optimization for the ad group, default value is FALSE.
-
#is_local_inventory ⇒ Object
Indicates whether the ad group should use the local inventory.
-
#lifetime_frequency_cap ⇒ Object
Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days.
-
#local_inventory_radius_in_miles ⇒ Object
The targeting radius of the local inventory ads in miles.
-
#name ⇒ Object
Ad group name.
-
#optimization_goal_metadata ⇒ Object
Optimization goals for objective-based performance campaigns.
-
#pacing_delivery_type ⇒ Object
Returns the value of attribute pacing_delivery_type.
-
#performance_plus_campaign_settings ⇒ Object
Pinterest Performance+ campaign settings.
- #placement_group ⇒ Object
-
#placement_traffic_type ⇒ Object
A targeting option that enables advertisers to choose whether to run ads in fullscreen feed, two column feed, or both.
-
#promotion_application_level ⇒ Object
Specify if the promotion is applied at ad group or item level.
-
#promotion_id ⇒ Object
Promotion ID.
-
#promotion_ids ⇒ Object
Promotion IDs list.
-
#start_time ⇒ Object
Timestamp in Unix format for scheduling when ads in the ad group start to appear.
-
#status ⇒ Object
Ad group/entity status.
-
#summary_status ⇒ Object
Returns the value of attribute summary_status.
-
#targeting_spec ⇒ Object
Returns the value of attribute targeting_spec.
-
#targeting_template_ids ⇒ Object
Targeting template IDs applied to the ad group.
-
#tracking_urls ⇒ Object
Returns the value of attribute tracking_urls.
-
#type ⇒ Object
Always "adgroup".
-
#updated_time ⇒ Object
Ad group last update time.
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_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3).
-
.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 = {}) ⇒ AdGroupUpdate
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 = {}) ⇒ AdGroupUpdate
Initializes the object
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 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 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 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 276 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `PinterestSdkClient::AdGroupUpdate` 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 `PinterestSdkClient::AdGroupUpdate`. 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?(:'ad_account_id') self.ad_account_id = attributes[:'ad_account_id'] end if attributes.key?(:'bid_in_micro_currency') self.bid_in_micro_currency = attributes[:'bid_in_micro_currency'] end if attributes.key?(:'bid_strategy_type') self.bid_strategy_type = attributes[:'bid_strategy_type'] end if attributes.key?(:'billable_event') self.billable_event = attributes[:'billable_event'] else self.billable_event = nil end if attributes.key?(:'budget_in_micro_currency') self.budget_in_micro_currency = attributes[:'budget_in_micro_currency'] end if attributes.key?(:'campaign_id') self.campaign_id = attributes[:'campaign_id'] else self.campaign_id = nil end if attributes.key?(:'conversion_learning_mode_type') self.conversion_learning_mode_type = attributes[:'conversion_learning_mode_type'] else self.conversion_learning_mode_type = nil end if attributes.key?(:'created_time') self.created_time = attributes[:'created_time'] else self.created_time = nil end if attributes.key?(:'customer_segment_id') self.customer_segment_id = attributes[:'customer_segment_id'] end if attributes.key?(:'dca_assets') self.dca_assets = attributes[:'dca_assets'] end if attributes.key?(:'end_time') self.end_time = attributes[:'end_time'] end if attributes.key?(:'ext_features') self.ext_features = attributes[:'ext_features'] end if attributes.key?(:'feed_profile_id') self.feed_profile_id = attributes[:'feed_profile_id'] end if attributes.key?(:'id') self.id = attributes[:'id'] else self.id = nil end if attributes.key?(:'is_creative_optimization') self.is_creative_optimization = attributes[:'is_creative_optimization'] end if attributes.key?(:'is_local_inventory') self.is_local_inventory = attributes[:'is_local_inventory'] end if attributes.key?(:'lifetime_frequency_cap') self.lifetime_frequency_cap = attributes[:'lifetime_frequency_cap'] end if attributes.key?(:'local_inventory_radius_in_miles') self.local_inventory_radius_in_miles = attributes[:'local_inventory_radius_in_miles'] end if attributes.key?(:'name') self.name = attributes[:'name'] else self.name = nil end if attributes.key?(:'optimization_goal_metadata') self. = attributes[:'optimization_goal_metadata'] end if attributes.key?(:'performance_plus_campaign_settings') self.performance_plus_campaign_settings = attributes[:'performance_plus_campaign_settings'] end if attributes.key?(:'placement_group') self.placement_group = attributes[:'placement_group'] end if attributes.key?(:'placement_traffic_type') self.placement_traffic_type = attributes[:'placement_traffic_type'] end if attributes.key?(:'promotion_application_level') self.promotion_application_level = attributes[:'promotion_application_level'] end if attributes.key?(:'promotion_id') self.promotion_id = attributes[:'promotion_id'] else self.promotion_id = '0' end if attributes.key?(:'promotion_ids') if (value = attributes[:'promotion_ids']).is_a?(Array) self.promotion_ids = value end end if attributes.key?(:'start_time') self.start_time = attributes[:'start_time'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'summary_status') self.summary_status = attributes[:'summary_status'] else self.summary_status = nil end if attributes.key?(:'targeting_spec') self.targeting_spec = attributes[:'targeting_spec'] end if attributes.key?(:'targeting_template_ids') if (value = attributes[:'targeting_template_ids']).is_a?(Array) self.targeting_template_ids = value end end if attributes.key?(:'tracking_urls') self.tracking_urls = attributes[:'tracking_urls'] end if attributes.key?(:'type') self.type = attributes[:'type'] else self.type = 'adgroup' end if attributes.key?(:'updated_time') self.updated_time = attributes[:'updated_time'] else self.updated_time = nil end if attributes.key?(:'auto_targeting_enabled') self.auto_targeting_enabled = attributes[:'auto_targeting_enabled'] end if attributes.key?(:'bid_multiplier') self.bid_multiplier = attributes[:'bid_multiplier'] end if attributes.key?(:'budget_type') self.budget_type = attributes[:'budget_type'] end if attributes.key?(:'pacing_delivery_type') self.pacing_delivery_type = attributes[:'pacing_delivery_type'] end end |
Instance Attribute Details
#ad_account_id ⇒ Object
Advertiser ID.
19 20 21 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 19 def ad_account_id @ad_account_id end |
#auto_targeting_enabled ⇒ Object
Enable auto-targeting for ad group. Default value is True. Also known as "Performance+ targeting".
115 116 117 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 115 def auto_targeting_enabled @auto_targeting_enabled end |
#bid_in_micro_currency ⇒ Object
Bid price in micro currency. This field is REQUIRED for the following campaign objective_type/billable_event combinations: AWARENESS/IMPRESSION, CONSIDERATION/CLICKTHROUGH, CATALOG_SALES/CLICKTHROUGH, VIDEO_VIEW/VIDEO_V_50_MRC.
22 23 24 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 22 def bid_in_micro_currency @bid_in_micro_currency end |
#bid_multiplier ⇒ Object
Open beta Bid multiplier for ad group. This value is a double between 0.1 and 10.0. Enter 0 to remove the bid multiplier. - Not currently supported for Performance+ campaigns.
118 119 120 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 118 def bid_multiplier @bid_multiplier end |
#bid_strategy_type ⇒ Object
Returns the value of attribute bid_strategy_type.
24 25 26 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 24 def bid_strategy_type @bid_strategy_type end |
#billable_event ⇒ Object
Returns the value of attribute billable_event.
26 27 28 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 26 def billable_event @billable_event end |
#budget_in_micro_currency ⇒ Object
Budget in micro currency. This field is REQUIRED for non-CBO (campaign budget optimization) campaigns. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. A CBO campaign is limited to 70 or less ad groups.
29 30 31 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 29 def budget_in_micro_currency @budget_in_micro_currency end |
#budget_type ⇒ Object
Returns the value of attribute budget_type.
120 121 122 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 120 def budget_type @budget_type end |
#campaign_id ⇒ Object
Campaign ID of the ad group.
32 33 34 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 32 def campaign_id @campaign_id end |
#conversion_learning_mode_type ⇒ Object
oCPM learn mode
35 36 37 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 35 def conversion_learning_mode_type @conversion_learning_mode_type end |
#created_time ⇒ Object
Ad group creation time. Unix timestamp in seconds.
38 39 40 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 38 def created_time @created_time end |
#customer_segment_id ⇒ Object
Customer segment ID applied to the ad group. We currently only support 1 customer segment per ad group. To use customer segments, do not set the targeting_template_ids field as well as the AUDIENCE_INCLUDE field of the targeting_spec. To clear the customer segment ID, set this field to '0'.
41 42 43 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 41 def customer_segment_id @customer_segment_id end |
#dca_assets ⇒ Object
[DCA] The Dynamic creative assets to use for DCA. Dynamic Creative Assembly (DCA) accepts basic creative assets of an ad (image, video, title, call to action, logo etc). Then it automatically generates optimized ad combinations based on these assets.
44 45 46 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 44 def dca_assets @dca_assets end |
#end_time ⇒ Object
Timestamp in Unix format for scheduling when ads in the ad group stop appearing. If not specified, ads run indefinitely unless you update the ad group by changing their status to paused. Cannot occur after end_time for parent campaign (if specified). Learn about scheduling ads. For certain organizations (Closed beta): Supported for campaigns with Campaign Budget Optimization (CBO). For all organizations: Supported for campaigns without CBO.
47 48 49 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 47 def end_time @end_time end |
#ext_features ⇒ Object
Returns the value of attribute ext_features.
49 50 51 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 49 def ext_features @ext_features end |
#feed_profile_id ⇒ Object
Feed Profile ID associated to the adgroup.
52 53 54 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 52 def feed_profile_id @feed_profile_id end |
#id ⇒ Object
Ad group ID.
55 56 57 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 55 def id @id end |
#is_creative_optimization ⇒ Object
Enable creative optimization for the ad group, default value is FALSE. When enabled, you allow Pinterest to automatically turn your product Pins into ads in different formats (collections and shopping) and deliver those ads to users at scale.
58 59 60 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 58 def is_creative_optimization @is_creative_optimization end |
#is_local_inventory ⇒ Object
Indicates whether the ad group should use the local inventory.
61 62 63 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 61 def is_local_inventory @is_local_inventory end |
#lifetime_frequency_cap ⇒ Object
Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION billable_event value. This field REQUIRES the end_time field.
64 65 66 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 64 def lifetime_frequency_cap @lifetime_frequency_cap end |
#local_inventory_radius_in_miles ⇒ Object
The targeting radius of the local inventory ads in miles.
67 68 69 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 67 def local_inventory_radius_in_miles @local_inventory_radius_in_miles end |
#name ⇒ Object
Ad group name.
70 71 72 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 70 def name @name end |
#optimization_goal_metadata ⇒ Object
Optimization goals for objective-based performance campaigns. REQUIRED when campaign's objective_type is set to \"WEB_CONVERSION\".
73 74 75 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 73 def end |
#pacing_delivery_type ⇒ Object
Returns the value of attribute pacing_delivery_type.
122 123 124 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 122 def pacing_delivery_type @pacing_delivery_type end |
#performance_plus_campaign_settings ⇒ Object
Pinterest Performance+ campaign settings.
76 77 78 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 76 def performance_plus_campaign_settings @performance_plus_campaign_settings end |
#placement_group ⇒ Object
79 80 81 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 79 def placement_group @placement_group end |
#placement_traffic_type ⇒ Object
A targeting option that enables advertisers to choose whether to run ads in fullscreen feed, two column feed, or both
82 83 84 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 82 def placement_traffic_type @placement_traffic_type end |
#promotion_application_level ⇒ Object
Specify if the promotion is applied at ad group or item level
85 86 87 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 85 def promotion_application_level @promotion_application_level end |
#promotion_id ⇒ Object
Promotion ID. To clear this field, set to null.
88 89 90 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 88 def promotion_id @promotion_id end |
#promotion_ids ⇒ Object
Promotion IDs list. To clear this field, set to an empty array [].
91 92 93 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 91 def promotion_ids @promotion_ids end |
#start_time ⇒ Object
Timestamp in Unix format for scheduling when ads in the ad group start to appear. If not specified, ads appear during parent campaign's start_time. Cannot precede start_time for parent campaign (if specified). Learn about scheduling ads. For certain organizations (Closed beta): Supported for campaigns with Campaign Budget Optimization (CBO). For all organizations: Supported for campaigns without CBO.
94 95 96 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 94 def start_time @start_time end |
#status ⇒ Object
Ad group/entity status.
97 98 99 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 97 def status @status end |
#summary_status ⇒ Object
Returns the value of attribute summary_status.
99 100 101 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 99 def summary_status @summary_status end |
#targeting_spec ⇒ Object
Returns the value of attribute targeting_spec.
101 102 103 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 101 def targeting_spec @targeting_spec end |
#targeting_template_ids ⇒ Object
Targeting template IDs applied to the ad group. We currently only support 1 targeting template per ad group. To use targeting templates, do not set any other targeting fields: targeting_spec, tracking_urls, auto_targeting_enabled, placement_group. To clear all targeting template IDs, set this field to ['0'].
104 105 106 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 104 def targeting_template_ids @targeting_template_ids end |
#tracking_urls ⇒ Object
Returns the value of attribute tracking_urls.
106 107 108 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 106 def tracking_urls @tracking_urls end |
#type ⇒ Object
Always "adgroup".
109 110 111 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 109 def type @type end |
#updated_time ⇒ Object
Ad group last update time. Unix timestamp in seconds.
112 113 114 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 112 def updated_time @updated_time end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
191 192 193 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 191 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
196 197 198 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 196 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
147 148 149 150 151 152 153 154 155 156 157 158 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 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 147 def self.attribute_map { :'ad_account_id' => :'ad_account_id', :'bid_in_micro_currency' => :'bid_in_micro_currency', :'bid_strategy_type' => :'bid_strategy_type', :'billable_event' => :'billable_event', :'budget_in_micro_currency' => :'budget_in_micro_currency', :'campaign_id' => :'campaign_id', :'conversion_learning_mode_type' => :'conversion_learning_mode_type', :'created_time' => :'created_time', :'customer_segment_id' => :'customer_segment_id', :'dca_assets' => :'dca_assets', :'end_time' => :'end_time', :'ext_features' => :'ext_features', :'feed_profile_id' => :'feed_profile_id', :'id' => :'id', :'is_creative_optimization' => :'is_creative_optimization', :'is_local_inventory' => :'is_local_inventory', :'lifetime_frequency_cap' => :'lifetime_frequency_cap', :'local_inventory_radius_in_miles' => :'local_inventory_radius_in_miles', :'name' => :'name', :'optimization_goal_metadata' => :'optimization_goal_metadata', :'performance_plus_campaign_settings' => :'performance_plus_campaign_settings', :'placement_group' => :'placement_group', :'placement_traffic_type' => :'placement_traffic_type', :'promotion_application_level' => :'promotion_application_level', :'promotion_id' => :'promotion_id', :'promotion_ids' => :'promotion_ids', :'start_time' => :'start_time', :'status' => :'status', :'summary_status' => :'summary_status', :'targeting_spec' => :'targeting_spec', :'targeting_template_ids' => :'targeting_template_ids', :'tracking_urls' => :'tracking_urls', :'type' => :'type', :'updated_time' => :'updated_time', :'auto_targeting_enabled' => :'auto_targeting_enabled', :'bid_multiplier' => :'bid_multiplier', :'budget_type' => :'budget_type', :'pacing_delivery_type' => :'pacing_delivery_type' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 795 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_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
268 269 270 271 272 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 268 def self.openapi_all_of [ :'AdGroupBase' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 245 def self.openapi_nullable Set.new([ :'bid_in_micro_currency', :'bid_strategy_type', :'budget_in_micro_currency', :'conversion_learning_mode_type', :'dca_assets', :'end_time', :'ext_features', :'is_creative_optimization', :'optimization_goal_metadata', :'performance_plus_campaign_settings', :'placement_traffic_type', :'promotion_application_level', :'promotion_id', :'start_time', :'targeting_template_ids', :'tracking_urls', :'auto_targeting_enabled', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
201 202 203 204 205 206 207 208 209 210 211 212 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 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 201 def self.openapi_types { :'ad_account_id' => :'String', :'bid_in_micro_currency' => :'Integer', :'bid_strategy_type' => :'BidStrategyType', :'billable_event' => :'ActionType', :'budget_in_micro_currency' => :'Integer', :'campaign_id' => :'String', :'conversion_learning_mode_type' => :'ConversionLearningModeType', :'created_time' => :'Integer', :'customer_segment_id' => :'String', :'dca_assets' => :'Object', :'end_time' => :'Integer', :'ext_features' => :'AdgroupTrackingFeatures', :'feed_profile_id' => :'String', :'id' => :'String', :'is_creative_optimization' => :'Boolean', :'is_local_inventory' => :'Boolean', :'lifetime_frequency_cap' => :'Integer', :'local_inventory_radius_in_miles' => :'Float', :'name' => :'String', :'optimization_goal_metadata' => :'NullableOptimizationGoalMetadata', :'performance_plus_campaign_settings' => :'PerformancePlusCampaignSettings', :'placement_group' => :'PlacementGroupType', :'placement_traffic_type' => :'PlacementTrafficType', :'promotion_application_level' => :'PromotionApplicationLevel', :'promotion_id' => :'String', :'promotion_ids' => :'Array<String>', :'start_time' => :'Integer', :'status' => :'EntityStatus', :'summary_status' => :'SummaryStatus', :'targeting_spec' => :'TargetingSpecOptimal', :'targeting_template_ids' => :'Array<String>', :'tracking_urls' => :'AdGroupTrackingURLs', :'type' => :'String', :'updated_time' => :'Integer', :'auto_targeting_enabled' => :'Boolean', :'bid_multiplier' => :'Float', :'budget_type' => :'BudgetType', :'pacing_delivery_type' => :'PacingDeliveryType' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 737 def ==(o) return true if self.equal?(o) self.class == o.class && ad_account_id == o.ad_account_id && bid_in_micro_currency == o.bid_in_micro_currency && bid_strategy_type == o.bid_strategy_type && billable_event == o.billable_event && budget_in_micro_currency == o.budget_in_micro_currency && campaign_id == o.campaign_id && conversion_learning_mode_type == o.conversion_learning_mode_type && created_time == o.created_time && customer_segment_id == o.customer_segment_id && dca_assets == o.dca_assets && end_time == o.end_time && ext_features == o.ext_features && feed_profile_id == o.feed_profile_id && id == o.id && is_creative_optimization == o.is_creative_optimization && is_local_inventory == o.is_local_inventory && lifetime_frequency_cap == o.lifetime_frequency_cap && local_inventory_radius_in_miles == o.local_inventory_radius_in_miles && name == o.name && == o. && performance_plus_campaign_settings == o.performance_plus_campaign_settings && placement_group == o.placement_group && placement_traffic_type == o.placement_traffic_type && promotion_application_level == o.promotion_application_level && promotion_id == o.promotion_id && promotion_ids == o.promotion_ids && start_time == o.start_time && status == o.status && summary_status == o.summary_status && targeting_spec == o.targeting_spec && targeting_template_ids == o.targeting_template_ids && tracking_urls == o.tracking_urls && type == o.type && updated_time == o.updated_time && auto_targeting_enabled == o.auto_targeting_enabled && bid_multiplier == o.bid_multiplier && budget_type == o.budget_type && pacing_delivery_type == o.pacing_delivery_type end |
#eql?(o) ⇒ Boolean
782 783 784 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 782 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
788 789 790 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 788 def hash [ad_account_id, bid_in_micro_currency, bid_strategy_type, billable_event, budget_in_micro_currency, campaign_id, conversion_learning_mode_type, created_time, customer_segment_id, dca_assets, end_time, ext_features, feed_profile_id, id, is_creative_optimization, is_local_inventory, lifetime_frequency_cap, local_inventory_radius_in_miles, name, , performance_plus_campaign_settings, placement_group, placement_traffic_type, promotion_application_level, promotion_id, promotion_ids, start_time, status, summary_status, targeting_spec, targeting_template_ids, tracking_urls, type, updated_time, auto_targeting_enabled, bid_multiplier, budget_type, pacing_delivery_type].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 469 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new pattern = Regexp.new(/^\d+$/) if !@ad_account_id.nil? && @ad_account_id !~ pattern invalid_properties.push("invalid value for \"ad_account_id\", must conform to the pattern #{pattern}.") end if @billable_event.nil? invalid_properties.push('invalid value for "billable_event", billable_event cannot be nil.') end if @campaign_id.nil? invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.') end pattern = Regexp.new(/^[C]?\d+$/) if @campaign_id !~ pattern invalid_properties.push("invalid value for \"campaign_id\", must conform to the pattern #{pattern}.") end if @created_time.nil? invalid_properties.push('invalid value for "created_time", created_time cannot be nil.') end pattern = Regexp.new(/^\d+$/) if !@customer_segment_id.nil? && @customer_segment_id !~ pattern invalid_properties.push("invalid value for \"customer_segment_id\", must conform to the pattern #{pattern}.") end if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @id.to_s.length > 18 invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 18.') end pattern = Regexp.new(/^\d+$/) if @id !~ pattern invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.") end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end pattern = Regexp.new(/^\d+$/) if !@promotion_id.nil? && @promotion_id !~ pattern invalid_properties.push("invalid value for \"promotion_id\", must conform to the pattern #{pattern}.") end if @summary_status.nil? invalid_properties.push('invalid value for "summary_status", summary_status cannot be nil.') end if !@targeting_template_ids.nil? && @targeting_template_ids.length > 1 invalid_properties.push('invalid value for "targeting_template_ids", number of items must be less than or equal to 1.') end if @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end if @updated_time.nil? invalid_properties.push('invalid value for "updated_time", updated_time cannot be nil.') end if !@bid_multiplier.nil? && @bid_multiplier > 10 invalid_properties.push('invalid value for "bid_multiplier", must be smaller than or equal to 10.') end if !@bid_multiplier.nil? && @bid_multiplier < 0 invalid_properties.push('invalid value for "bid_multiplier", must be greater than or equal to 0.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
817 818 819 820 821 822 823 824 825 826 827 828 829 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 817 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
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 |
# File 'lib/pinterest_sdk/models/ad_group_update.rb', line 550 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@ad_account_id.nil? && @ad_account_id !~ Regexp.new(/^\d+$/) return false if @billable_event.nil? return false if @campaign_id.nil? return false if @campaign_id !~ Regexp.new(/^[C]?\d+$/) return false if @created_time.nil? return false if !@customer_segment_id.nil? && @customer_segment_id !~ Regexp.new(/^\d+$/) return false if @id.nil? return false if @id.to_s.length > 18 return false if @id !~ Regexp.new(/^\d+$/) return false if @name.nil? return false if !@promotion_id.nil? && @promotion_id !~ Regexp.new(/^\d+$/) return false if @summary_status.nil? return false if !@targeting_template_ids.nil? && @targeting_template_ids.length > 1 return false if @type.nil? return false if @updated_time.nil? return false if !@bid_multiplier.nil? && @bid_multiplier > 10 return false if !@bid_multiplier.nil? && @bid_multiplier < 0 true end |