Class: PinterestSdkClient::AdsAnalyticsCreateAsyncRequest
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- PinterestSdkClient::AdsAnalyticsCreateAsyncRequest
- Defined in:
- lib/pinterest_sdk/models/ads_analytics_create_async_request.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#ad_group_ids ⇒ Object
List of ad group ids.
-
#ad_group_statuses ⇒ Object
List of values for filtering.
-
#ad_ids ⇒ Object
List of ad ids.
-
#ad_statuses ⇒ Object
List of values for filtering.
-
#attribution_types ⇒ Object
List of attribution types for the conversion report.
-
#campaign_brand_label ⇒ Object
Campaign brand label for filtering.
-
#campaign_custom_label ⇒ Object
Campaign custom label for filtering.
-
#campaign_ids ⇒ Object
List of campaign ids.
-
#campaign_objective_types ⇒ Object
List of values for filtering.
-
#campaign_statuses ⇒ Object
List of status values for filtering.
-
#click_window_days ⇒ Object
Number of days to use as the conversion attribution window for a pin click action.
-
#columns ⇒ Object
Metric and entity columns.
-
#combine_targeting_types ⇒ Object
Determines if the targeting types included in the request should be consolidated into a single breakdown.
-
#conversion_report_time ⇒ Object
Date dimension for conversion metrics.
-
#custom_conversion_event_metrics ⇒ Object
List of advertiser-defined custom conversion event metrics to include in the report.
-
#end_date ⇒ Object
Metric report end date (UTC).
-
#end_hour ⇒ Object
Which hour of the end date to stop the report (inclusive).
-
#engagement_window_days ⇒ Object
Number of days to use as the conversion attribution window for an engagement action.
-
#granularity ⇒ Object
TOTAL - metrics are aggregated over the specified date range.
-
#level ⇒ Object
Level of the report.
-
#metrics_filters ⇒ Object
List of metrics filters.
-
#primary_sort ⇒ Object
Returns the value of attribute primary_sort.
-
#product_group_ids ⇒ Object
List of product group ids.
-
#product_group_statuses ⇒ Object
List of values for filtering.
-
#product_item_ids ⇒ Object
List of product item ids.
-
#report_format ⇒ Object
Returns the value of attribute report_format.
-
#reporting_timezone ⇒ Object
Specify the timezone to be applied for the reporting.
-
#start_date ⇒ Object
Metric report start date (UTC).
-
#start_hour ⇒ Object
Which hour of the start date to begin the report.
-
#targeting_types ⇒ Object
List of targeting types.
-
#view_window_days ⇒ Object
Number of days to use as the conversion attribution window for a view action.
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 = {}) ⇒ AdsAnalyticsCreateAsyncRequest
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 = {}) ⇒ AdsAnalyticsCreateAsyncRequest
Initializes the object
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 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 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 223 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `PinterestSdkClient::AdsAnalyticsCreateAsyncRequest` 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::AdsAnalyticsCreateAsyncRequest`. 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_group_ids') if (value = attributes[:'ad_group_ids']).is_a?(Array) self.ad_group_ids = value end end if attributes.key?(:'ad_group_statuses') if (value = attributes[:'ad_group_statuses']).is_a?(Array) self.ad_group_statuses = value end end if attributes.key?(:'ad_ids') if (value = attributes[:'ad_ids']).is_a?(Array) self.ad_ids = value end end if attributes.key?(:'ad_statuses') if (value = attributes[:'ad_statuses']).is_a?(Array) self.ad_statuses = value end end if attributes.key?(:'attribution_types') if (value = attributes[:'attribution_types']).is_a?(Array) self.attribution_types = value end end if attributes.key?(:'campaign_brand_label') self.campaign_brand_label = attributes[:'campaign_brand_label'] end if attributes.key?(:'campaign_custom_label') self.campaign_custom_label = attributes[:'campaign_custom_label'] end if attributes.key?(:'campaign_ids') if (value = attributes[:'campaign_ids']).is_a?(Array) self.campaign_ids = value end end if attributes.key?(:'campaign_objective_types') if (value = attributes[:'campaign_objective_types']).is_a?(Array) self.campaign_objective_types = value end end if attributes.key?(:'campaign_statuses') if (value = attributes[:'campaign_statuses']).is_a?(Array) self.campaign_statuses = value end end if attributes.key?(:'click_window_days') self.click_window_days = attributes[:'click_window_days'] end if attributes.key?(:'columns') if (value = attributes[:'columns']).is_a?(Array) self.columns = value end end if attributes.key?(:'combine_targeting_types') self.combine_targeting_types = attributes[:'combine_targeting_types'] else self.combine_targeting_types = false end if attributes.key?(:'conversion_report_time') self.conversion_report_time = attributes[:'conversion_report_time'] end if attributes.key?(:'custom_conversion_event_metrics') if (value = attributes[:'custom_conversion_event_metrics']).is_a?(Array) self.custom_conversion_event_metrics = value end end if attributes.key?(:'end_date') self.end_date = attributes[:'end_date'] else self.end_date = nil end if attributes.key?(:'end_hour') self.end_hour = attributes[:'end_hour'] end if attributes.key?(:'engagement_window_days') self.engagement_window_days = attributes[:'engagement_window_days'] end if attributes.key?(:'granularity') self.granularity = attributes[:'granularity'] else self.granularity = nil end if attributes.key?(:'level') self.level = attributes[:'level'] end if attributes.key?(:'metrics_filters') if (value = attributes[:'metrics_filters']).is_a?(Array) self.metrics_filters = value end end if attributes.key?(:'primary_sort') self.primary_sort = attributes[:'primary_sort'] end if attributes.key?(:'product_group_ids') if (value = attributes[:'product_group_ids']).is_a?(Array) self.product_group_ids = value end end if attributes.key?(:'product_group_statuses') if (value = attributes[:'product_group_statuses']).is_a?(Array) self.product_group_statuses = value end end if attributes.key?(:'product_item_ids') if (value = attributes[:'product_item_ids']).is_a?(Array) self.product_item_ids = value end end if attributes.key?(:'report_format') self.report_format = attributes[:'report_format'] end if attributes.key?(:'reporting_timezone') self.reporting_timezone = attributes[:'reporting_timezone'] end if attributes.key?(:'start_date') self.start_date = attributes[:'start_date'] else self.start_date = nil end if attributes.key?(:'start_hour') self.start_hour = attributes[:'start_hour'] end if attributes.key?(:'targeting_types') if (value = attributes[:'targeting_types']).is_a?(Array) self.targeting_types = value end end if attributes.key?(:'view_window_days') self.view_window_days = attributes[:'view_window_days'] end end |
Instance Attribute Details
#ad_group_ids ⇒ Object
List of ad group ids
19 20 21 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 19 def ad_group_ids @ad_group_ids end |
#ad_group_statuses ⇒ Object
List of values for filtering
22 23 24 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 22 def ad_group_statuses @ad_group_statuses end |
#ad_ids ⇒ Object
List of ad ids. This parameter is not supported for Product Item level reports.
25 26 27 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 25 def ad_ids @ad_ids end |
#ad_statuses ⇒ Object
List of values for filtering. This parameter is not supported for Product Item level reports.
28 29 30 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 28 def ad_statuses @ad_statuses end |
#attribution_types ⇒ Object
List of attribution types for the conversion report.
31 32 33 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 31 def attribution_types @attribution_types end |
#campaign_brand_label ⇒ Object
Campaign brand label for filtering.
34 35 36 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 34 def campaign_brand_label @campaign_brand_label end |
#campaign_custom_label ⇒ Object
Campaign custom label for filtering.
37 38 39 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 37 def campaign_custom_label @campaign_custom_label end |
#campaign_ids ⇒ Object
List of campaign ids
40 41 42 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 40 def campaign_ids @campaign_ids end |
#campaign_objective_types ⇒ Object
List of values for filtering. ["WEB_SESSIONS"] is in BETA.
43 44 45 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 43 def campaign_objective_types @campaign_objective_types end |
#campaign_statuses ⇒ Object
List of status values for filtering
46 47 48 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 46 def campaign_statuses @campaign_statuses end |
#click_window_days ⇒ Object
Number of days to use as the conversion attribution window for a pin click action.
49 50 51 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 49 def click_window_days @click_window_days end |
#columns ⇒ Object
Metric and entity columns. Pin promotion and ad related columns are not supported for Product Item level reports.
52 53 54 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 52 def columns @columns end |
#combine_targeting_types ⇒ Object
Determines if the targeting types included in the request should be consolidated into a single breakdown.
55 56 57 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 55 def combine_targeting_types @combine_targeting_types end |
#conversion_report_time ⇒ Object
Date dimension for conversion metrics.
58 59 60 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 58 def conversion_report_time @conversion_report_time end |
#custom_conversion_event_metrics ⇒ Object
List of advertiser-defined custom conversion event metrics to include in the report
61 62 63 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 61 def custom_conversion_event_metrics @custom_conversion_event_metrics end |
#end_date ⇒ Object
Metric report end date (UTC). Format: YYYY-MM-DD
64 65 66 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 64 def end_date @end_date end |
#end_hour ⇒ Object
Which hour of the end date to stop the report (inclusive). Only allowed for hourly reports.
67 68 69 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 67 def end_hour @end_hour end |
#engagement_window_days ⇒ Object
Number of days to use as the conversion attribution window for an engagement action.
70 71 72 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 70 def engagement_window_days @engagement_window_days end |
#granularity ⇒ Object
TOTAL - metrics are aggregated over the specified date range. DAY - metrics are broken down daily. HOUR - metrics are broken down hourly. WEEKLY - metrics are broken down weekly. MONTHLY - metrics are broken down monthly.
73 74 75 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 73 def granularity @granularity end |
#level ⇒ Object
Level of the report
76 77 78 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 76 def level @level end |
#metrics_filters ⇒ Object
List of metrics filters
79 80 81 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 79 def metrics_filters @metrics_filters end |
#primary_sort ⇒ Object
Returns the value of attribute primary_sort.
81 82 83 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 81 def primary_sort @primary_sort end |
#product_group_ids ⇒ Object
List of product group ids
84 85 86 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 84 def product_group_ids @product_group_ids end |
#product_group_statuses ⇒ Object
List of values for filtering
87 88 89 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 87 def product_group_statuses @product_group_statuses end |
#product_item_ids ⇒ Object
List of product item ids
90 91 92 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 90 def product_item_ids @product_item_ids end |
#report_format ⇒ Object
Returns the value of attribute report_format.
92 93 94 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 92 def report_format @report_format end |
#reporting_timezone ⇒ Object
Specify the timezone to be applied for the reporting.
95 96 97 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 95 def reporting_timezone @reporting_timezone end |
#start_date ⇒ Object
Metric report start date (UTC). Format: YYYY-MM-DD
98 99 100 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 98 def start_date @start_date end |
#start_hour ⇒ Object
Which hour of the start date to begin the report. Only allowed for hourly reports.
101 102 103 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 101 def start_hour @start_hour end |
#targeting_types ⇒ Object
List of targeting types. Requires level to be a value ending in _TARGETING.
104 105 106 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 104 def targeting_types @targeting_types end |
#view_window_days ⇒ Object
Number of days to use as the conversion attribution window for a view action.
107 108 109 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 107 def view_window_days @view_window_days end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
169 170 171 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 169 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
174 175 176 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 174 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 132 def self.attribute_map { :'ad_group_ids' => :'ad_group_ids', :'ad_group_statuses' => :'ad_group_statuses', :'ad_ids' => :'ad_ids', :'ad_statuses' => :'ad_statuses', :'attribution_types' => :'attribution_types', :'campaign_brand_label' => :'campaign_brand_label', :'campaign_custom_label' => :'campaign_custom_label', :'campaign_ids' => :'campaign_ids', :'campaign_objective_types' => :'campaign_objective_types', :'campaign_statuses' => :'campaign_statuses', :'click_window_days' => :'click_window_days', :'columns' => :'columns', :'combine_targeting_types' => :'combine_targeting_types', :'conversion_report_time' => :'conversion_report_time', :'custom_conversion_event_metrics' => :'custom_conversion_event_metrics', :'end_date' => :'end_date', :'end_hour' => :'end_hour', :'engagement_window_days' => :'engagement_window_days', :'granularity' => :'granularity', :'level' => :'level', :'metrics_filters' => :'metrics_filters', :'primary_sort' => :'primary_sort', :'product_group_ids' => :'product_group_ids', :'product_group_statuses' => :'product_group_statuses', :'product_item_ids' => :'product_item_ids', :'report_format' => :'report_format', :'reporting_timezone' => :'reporting_timezone', :'start_date' => :'start_date', :'start_hour' => :'start_hour', :'targeting_types' => :'targeting_types', :'view_window_days' => :'view_window_days' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 918 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
216 217 218 219 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 216 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 179 def self.openapi_types { :'ad_group_ids' => :'Array<String>', :'ad_group_statuses' => :'Array<AdGroupSummaryStatus>', :'ad_ids' => :'Array<String>', :'ad_statuses' => :'Array<PinPromotionSummaryStatus>', :'attribution_types' => :'Array<ConversionReportAttributionType>', :'campaign_brand_label' => :'String', :'campaign_custom_label' => :'String', :'campaign_ids' => :'Array<String>', :'campaign_objective_types' => :'Array<CampaignObjectiveType>', :'campaign_statuses' => :'Array<CampaignSummaryStatus>', :'click_window_days' => :'ConversionAttributionWindowDays', :'columns' => :'Array<ReportingColumnAsync>', :'combine_targeting_types' => :'Boolean', :'conversion_report_time' => :'ConversionReportTimeType', :'custom_conversion_event_metrics' => :'Array<CustomConversionEventMetrics>', :'end_date' => :'String', :'end_hour' => :'Integer', :'engagement_window_days' => :'ConversionAttributionWindowDays', :'granularity' => :'Granularity', :'level' => :'MetricsReportingLevel', :'metrics_filters' => :'Array<AdsAnalyticsMetricsFilter>', :'primary_sort' => :'PrimarySort', :'product_group_ids' => :'Array<String>', :'product_group_statuses' => :'Array<ProductGroupSummaryStatus>', :'product_item_ids' => :'Array<String>', :'report_format' => :'DataOutputFormat', :'reporting_timezone' => :'ReportingTimeZone', :'start_date' => :'String', :'start_hour' => :'Integer', :'targeting_types' => :'Array<AdAdsAnalyticsAsyncTargetingTypes>', :'view_window_days' => :'ConversionAttributionWindowDays' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 867 def ==(o) return true if self.equal?(o) self.class == o.class && ad_group_ids == o.ad_group_ids && ad_group_statuses == o.ad_group_statuses && ad_ids == o.ad_ids && ad_statuses == o.ad_statuses && attribution_types == o.attribution_types && campaign_brand_label == o.campaign_brand_label && campaign_custom_label == o.campaign_custom_label && campaign_ids == o.campaign_ids && campaign_objective_types == o.campaign_objective_types && campaign_statuses == o.campaign_statuses && click_window_days == o.click_window_days && columns == o.columns && combine_targeting_types == o.combine_targeting_types && conversion_report_time == o.conversion_report_time && custom_conversion_event_metrics == o.custom_conversion_event_metrics && end_date == o.end_date && end_hour == o.end_hour && engagement_window_days == o.engagement_window_days && granularity == o.granularity && level == o.level && metrics_filters == o.metrics_filters && primary_sort == o.primary_sort && product_group_ids == o.product_group_ids && product_group_statuses == o.product_group_statuses && product_item_ids == o.product_item_ids && report_format == o.report_format && reporting_timezone == o.reporting_timezone && start_date == o.start_date && start_hour == o.start_hour && targeting_types == o.targeting_types && view_window_days == o.view_window_days end |
#eql?(o) ⇒ Boolean
905 906 907 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 905 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
911 912 913 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 911 def hash [ad_group_ids, ad_group_statuses, ad_ids, ad_statuses, attribution_types, campaign_brand_label, campaign_custom_label, campaign_ids, campaign_objective_types, campaign_statuses, click_window_days, columns, combine_targeting_types, conversion_report_time, custom_conversion_event_metrics, end_date, end_hour, engagement_window_days, granularity, level, metrics_filters, primary_sort, product_group_ids, product_group_statuses, product_item_ids, report_format, reporting_timezone, start_date, start_hour, targeting_types, view_window_days].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 466 467 468 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 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 402 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@ad_group_ids.nil? && @ad_group_ids.length > 500 invalid_properties.push('invalid value for "ad_group_ids", number of items must be less than or equal to 500.') end if !@ad_group_ids.nil? && @ad_group_ids.length < 1 invalid_properties.push('invalid value for "ad_group_ids", number of items must be greater than or equal to 1.') end if !@ad_group_statuses.nil? && @ad_group_statuses.length > 6 invalid_properties.push('invalid value for "ad_group_statuses", number of items must be less than or equal to 6.') end if !@ad_group_statuses.nil? && @ad_group_statuses.length < 1 invalid_properties.push('invalid value for "ad_group_statuses", number of items must be greater than or equal to 1.') end if !@ad_ids.nil? && @ad_ids.length > 500 invalid_properties.push('invalid value for "ad_ids", number of items must be less than or equal to 500.') end if !@ad_ids.nil? && @ad_ids.length < 1 invalid_properties.push('invalid value for "ad_ids", number of items must be greater than or equal to 1.') end if !@ad_statuses.nil? && @ad_statuses.length > 6 invalid_properties.push('invalid value for "ad_statuses", number of items must be less than or equal to 6.') end if !@ad_statuses.nil? && @ad_statuses.length < 1 invalid_properties.push('invalid value for "ad_statuses", number of items must be greater than or equal to 1.') end if !@campaign_ids.nil? && @campaign_ids.length > 500 invalid_properties.push('invalid value for "campaign_ids", number of items must be less than or equal to 500.') end if !@campaign_ids.nil? && @campaign_ids.length < 1 invalid_properties.push('invalid value for "campaign_ids", number of items must be greater than or equal to 1.') end if !@campaign_objective_types.nil? && @campaign_objective_types.length > 7 invalid_properties.push('invalid value for "campaign_objective_types", number of items must be less than or equal to 7.') end if !@campaign_objective_types.nil? && @campaign_objective_types.length < 1 invalid_properties.push('invalid value for "campaign_objective_types", number of items must be greater than or equal to 1.') end if !@campaign_statuses.nil? && @campaign_statuses.length > 6 invalid_properties.push('invalid value for "campaign_statuses", number of items must be less than or equal to 6.') end if !@campaign_statuses.nil? && @campaign_statuses.length < 1 invalid_properties.push('invalid value for "campaign_statuses", number of items must be greater than or equal to 1.') end if @end_date.nil? invalid_properties.push('invalid value for "end_date", end_date cannot be nil.') end pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}$/) if @end_date !~ pattern invalid_properties.push("invalid value for \"end_date\", must conform to the pattern #{pattern}.") end if !@end_hour.nil? && @end_hour > 23 invalid_properties.push('invalid value for "end_hour", must be smaller than or equal to 23.') end if !@end_hour.nil? && @end_hour < 0 invalid_properties.push('invalid value for "end_hour", must be greater than or equal to 0.') end if @granularity.nil? invalid_properties.push('invalid value for "granularity", granularity cannot be nil.') end if !@metrics_filters.nil? && @metrics_filters.length < 1 invalid_properties.push('invalid value for "metrics_filters", number of items must be greater than or equal to 1.') end if !@product_group_ids.nil? && @product_group_ids.length > 500 invalid_properties.push('invalid value for "product_group_ids", number of items must be less than or equal to 500.') end if !@product_group_ids.nil? && @product_group_ids.length < 1 invalid_properties.push('invalid value for "product_group_ids", number of items must be greater than or equal to 1.') end if !@product_group_statuses.nil? && @product_group_statuses.length > 6 invalid_properties.push('invalid value for "product_group_statuses", number of items must be less than or equal to 6.') end if !@product_group_statuses.nil? && @product_group_statuses.length < 1 invalid_properties.push('invalid value for "product_group_statuses", number of items must be greater than or equal to 1.') end if !@product_item_ids.nil? && @product_item_ids.length > 500 invalid_properties.push('invalid value for "product_item_ids", number of items must be less than or equal to 500.') end if !@product_item_ids.nil? && @product_item_ids.length < 1 invalid_properties.push('invalid value for "product_item_ids", number of items must be greater than or equal to 1.') end if @start_date.nil? invalid_properties.push('invalid value for "start_date", start_date cannot be nil.') end pattern = Regexp.new(/^\d{4}-\d{2}-\d{2}$/) if @start_date !~ pattern invalid_properties.push("invalid value for \"start_date\", must conform to the pattern #{pattern}.") end if !@start_hour.nil? && @start_hour > 23 invalid_properties.push('invalid value for "start_hour", must be smaller than or equal to 23.') end if !@start_hour.nil? && @start_hour < 0 invalid_properties.push('invalid value for "start_hour", must be greater than or equal to 0.') end if !@targeting_types.nil? && @targeting_types.length > 5 invalid_properties.push('invalid value for "targeting_types", number of items must be less than or equal to 5.') end if !@targeting_types.nil? && @targeting_types.length < 1 invalid_properties.push('invalid value for "targeting_types", number of items must be greater than or equal to 1.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
940 941 942 943 944 945 946 947 948 949 950 951 952 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 940 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
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 |
# File 'lib/pinterest_sdk/models/ads_analytics_create_async_request.rb', line 540 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@ad_group_ids.nil? && @ad_group_ids.length > 500 return false if !@ad_group_ids.nil? && @ad_group_ids.length < 1 return false if !@ad_group_statuses.nil? && @ad_group_statuses.length > 6 return false if !@ad_group_statuses.nil? && @ad_group_statuses.length < 1 return false if !@ad_ids.nil? && @ad_ids.length > 500 return false if !@ad_ids.nil? && @ad_ids.length < 1 return false if !@ad_statuses.nil? && @ad_statuses.length > 6 return false if !@ad_statuses.nil? && @ad_statuses.length < 1 return false if !@campaign_ids.nil? && @campaign_ids.length > 500 return false if !@campaign_ids.nil? && @campaign_ids.length < 1 return false if !@campaign_objective_types.nil? && @campaign_objective_types.length > 7 return false if !@campaign_objective_types.nil? && @campaign_objective_types.length < 1 return false if !@campaign_statuses.nil? && @campaign_statuses.length > 6 return false if !@campaign_statuses.nil? && @campaign_statuses.length < 1 return false if @end_date.nil? return false if @end_date !~ Regexp.new(/^\d{4}-\d{2}-\d{2}$/) return false if !@end_hour.nil? && @end_hour > 23 return false if !@end_hour.nil? && @end_hour < 0 return false if @granularity.nil? return false if !@metrics_filters.nil? && @metrics_filters.length < 1 return false if !@product_group_ids.nil? && @product_group_ids.length > 500 return false if !@product_group_ids.nil? && @product_group_ids.length < 1 return false if !@product_group_statuses.nil? && @product_group_statuses.length > 6 return false if !@product_group_statuses.nil? && @product_group_statuses.length < 1 return false if !@product_item_ids.nil? && @product_item_ids.length > 500 return false if !@product_item_ids.nil? && @product_item_ids.length < 1 return false if @start_date.nil? return false if @start_date !~ Regexp.new(/^\d{4}-\d{2}-\d{2}$/) return false if !@start_hour.nil? && @start_hour > 23 return false if !@start_hour.nil? && @start_hour < 0 return false if !@targeting_types.nil? && @targeting_types.length > 5 return false if !@targeting_types.nil? && @targeting_types.length < 1 true end |