Class: PinterestSdkClient::CampaignBatchResponseData
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- PinterestSdkClient::CampaignBatchResponseData
- Defined in:
- lib/pinterest_sdk/models/campaign_batch_response_data.rb
Overview
Campaign data in batch response, with all fields optional to support error cases where data may be empty.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#ad_account_id ⇒ Object
Campaign's Advertiser ID.
-
#bid_options ⇒ Object
Restricted Object describing the campaign level bid multipliers.
-
#created_time ⇒ Object
Campaign creation time.
-
#daily_spend_cap ⇒ Object
Note: The default for this field is null, which is treated the same as 0.
-
#default_ad_group_budget_in_micro_currency ⇒ Object
When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget.
-
#end_time ⇒ Object
Note: To clear this field on update, set the end time to -1.
-
#id ⇒ Object
Campaign ID.
-
#intended_promotion_type ⇒ Object
Returns the value of attribute intended_promotion_type.
-
#is_automated_campaign ⇒ Object
Note: This field is immutable unless the campaign is in draft status.
-
#is_campaign_budget_optimization ⇒ Object
Note: This field is immutable unless the campaign is in draft status.
-
#is_carting ⇒ Object
Whether the campaign contains a carting(where-to-buy link) ad.
-
#is_flexible_daily_budgets ⇒ Object
Determine if a campaign has setup for flexible daily budgets, also known as "Pinterest Performance+ budgets".
-
#is_ltv_optimized ⇒ Object
Specifies whether the campaign is optimized for Lifetime Value (LTV).
-
#is_performance_plus ⇒ Object
Note: This field is immutable unless the campaign is in draft status.
-
#is_top_of_search ⇒ Object
Note: This field is immutable unless the campaign is in draft status.
-
#lifetime_spend_cap ⇒ Object
Note: The default for this field is null, which is treated the same as 0.
-
#name ⇒ Object
Campaign name - 255 chars max.
-
#objective_type ⇒ Object
Returns the value of attribute objective_type.
-
#order_line_id ⇒ Object
Note: To clear this field on update, set the order line ID to 0.
-
#performance_plus_campaign_settings ⇒ Object
Pinterest Performance+ campaign settings.
-
#start_time ⇒ Object
Timestamp in Unix format for scheduling when ads in the campaign start to appear.
-
#status ⇒ Object
Returns the value of attribute status.
-
#summary_status ⇒ Object
Returns the value of attribute summary_status.
-
#tracking_urls ⇒ Object
Returns the value of attribute tracking_urls.
-
#type ⇒ Object
Always "campaign".
-
#updated_time ⇒ Object
UTC timestamp.
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 = {}) ⇒ CampaignBatchResponseData
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 = {}) ⇒ CampaignBatchResponseData
Initializes the object
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 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 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 209 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `PinterestSdkClient::CampaignBatchResponseData` 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::CampaignBatchResponseData`. 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_options') self. = attributes[:'bid_options'] end if attributes.key?(:'created_time') self.created_time = attributes[:'created_time'] end if attributes.key?(:'daily_spend_cap') self.daily_spend_cap = attributes[:'daily_spend_cap'] end if attributes.key?(:'default_ad_group_budget_in_micro_currency') self.default_ad_group_budget_in_micro_currency = attributes[:'default_ad_group_budget_in_micro_currency'] end if attributes.key?(:'end_time') self.end_time = attributes[:'end_time'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'intended_promotion_type') self.intended_promotion_type = attributes[:'intended_promotion_type'] end if attributes.key?(:'is_automated_campaign') self.is_automated_campaign = attributes[:'is_automated_campaign'] end if attributes.key?(:'is_campaign_budget_optimization') self.is_campaign_budget_optimization = attributes[:'is_campaign_budget_optimization'] end if attributes.key?(:'is_carting') self.is_carting = attributes[:'is_carting'] end if attributes.key?(:'is_flexible_daily_budgets') self.is_flexible_daily_budgets = attributes[:'is_flexible_daily_budgets'] end if attributes.key?(:'is_ltv_optimized') self.is_ltv_optimized = attributes[:'is_ltv_optimized'] end if attributes.key?(:'is_performance_plus') self.is_performance_plus = attributes[:'is_performance_plus'] end if attributes.key?(:'is_top_of_search') self.is_top_of_search = attributes[:'is_top_of_search'] end if attributes.key?(:'lifetime_spend_cap') self.lifetime_spend_cap = attributes[:'lifetime_spend_cap'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'objective_type') self.objective_type = attributes[:'objective_type'] end if attributes.key?(:'order_line_id') self.order_line_id = attributes[:'order_line_id'] end if attributes.key?(:'performance_plus_campaign_settings') self.performance_plus_campaign_settings = attributes[:'performance_plus_campaign_settings'] 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'] end if attributes.key?(:'tracking_urls') self.tracking_urls = attributes[:'tracking_urls'] end if attributes.key?(:'type') self.type = attributes[:'type'] end if attributes.key?(:'updated_time') self.updated_time = attributes[:'updated_time'] end end |
Instance Attribute Details
#ad_account_id ⇒ Object
Campaign's Advertiser ID.
20 21 22 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 20 def ad_account_id @ad_account_id end |
#bid_options ⇒ Object
Restricted Object describing the campaign level bid multipliers.
23 24 25 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 23 def @bid_options end |
#created_time ⇒ Object
Campaign creation time. Unix timestamp in seconds.
26 27 28 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 26 def created_time @created_time end |
#daily_spend_cap ⇒ Object
Note: The default for this field is null, which is treated the same as 0. For campaign budget optimization, a daily or lifetime spend cap must be set, but not both. For ad group level budgets, this field must be 0 or unset.
29 30 31 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 29 def daily_spend_cap @daily_spend_cap end |
#default_ad_group_budget_in_micro_currency ⇒ Object
When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.
32 33 34 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 32 def default_ad_group_budget_in_micro_currency @default_ad_group_budget_in_micro_currency end |
#end_time ⇒ Object
Note: To clear this field on update, set the end time to -1. Timestamp in Unix format for scheduling when ads in the campaign stop appearing. Must occur after any end times for child ad groups. If end_time is not specified for the campaign, ads run indefinitely unless you update the campaign, changing their status to paused. Learn about scheduling campaigns. Different end times can be set for the campaign's child ad groups, but they cannot occur after an end_time specified for the campaign. - If your campaign has a child ad group with an end time specified, and if you update that campaign with an end_time that is earlier than that of the ad group, the campaign end_time will supersede the ad group end_time, and the request will not return an error. - In this scenario, if you call List campaigns or List ad groups, the returned campaigns or ad groups are listed with the start and end times that you assigned them, regardless of supersedence.
35 36 37 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 35 def end_time @end_time end |
#id ⇒ Object
Campaign ID.
38 39 40 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 38 def id @id end |
#intended_promotion_type ⇒ Object
Returns the value of attribute intended_promotion_type.
40 41 42 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 40 def intended_promotion_type @intended_promotion_type end |
#is_automated_campaign ⇒ Object
Note: This field is immutable unless the campaign is in draft status. Specifies whether the campaign was created in the automated campaign flow. When using Automated Campaigns, a daily spend cap must be set, and Pinterest Performance+ may not be used. The following objective types are supported: - CONSIDERATION - WEB\_CONVERSION - SALES - LEADS - CATALOG\_SALES
43 44 45 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 43 def is_automated_campaign @is_automated_campaign end |
#is_campaign_budget_optimization ⇒ Object
Note: This field is immutable unless the campaign is in draft status. Determines if a campaign automatically generates ad-group level budgets given a campaign budget to maximize campaign outcome. When using campaign budgets with a lifetime spend cap, the end time must be provided.
46 47 48 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 46 def is_campaign_budget_optimization @is_campaign_budget_optimization end |
#is_carting ⇒ Object
Whether the campaign contains a carting(where-to-buy link) ad.
49 50 51 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 49 def is_carting @is_carting end |
#is_flexible_daily_budgets ⇒ Object
Determine if a campaign has setup for flexible daily budgets, also known as "Pinterest Performance+ budgets". Flexible daily budgets are only supported for campaign budget optimization with a daily spend cap, and not a lifetime spend cap.
52 53 54 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 52 def is_flexible_daily_budgets @is_flexible_daily_budgets end |
#is_ltv_optimized ⇒ Object
Specifies whether the campaign is optimized for Lifetime Value (LTV). Only available for eligible advertisers.
55 56 57 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 55 def is_ltv_optimized @is_ltv_optimized end |
#is_performance_plus ⇒ Object
Note: This field is immutable unless the campaign is in draft status. You can only use this feature with the following objectives: - CONSIDERATION - WEB\_CONVERSION - SALES - LEADS - CATALOG\_SALES - APP\_INSTALL Enable Pinterest Performance+ for your campaign. To learn more, see Pinterest Performance+ Setup
58 59 60 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 58 def is_performance_plus @is_performance_plus end |
#is_top_of_search ⇒ Object
Note: This field is immutable unless the campaign is in draft status. Restricted Have your ads and content appear at the top of search result lists in Pinterest. You can only use this feature with the following objectives: - CONSIDERATION - WEB\_CONVERSION - SALES - LEADS - CATALOG\_SALES You cannot use this feature with Pinterest Performance+ or Premiere Spotlight enabled.
61 62 63 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 61 def is_top_of_search @is_top_of_search end |
#lifetime_spend_cap ⇒ Object
Note: The default for this field is null, which is treated the same as 0. For campaign budget optimization, a daily or lifetime spend cap must be set, but not both. For ad group level budgets, this field must be 0 or unset.
64 65 66 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 64 def lifetime_spend_cap @lifetime_spend_cap end |
#name ⇒ Object
Campaign name - 255 chars max.
67 68 69 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 67 def name @name end |
#objective_type ⇒ Object
Returns the value of attribute objective_type.
69 70 71 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 69 def objective_type @objective_type end |
#order_line_id ⇒ Object
Note: To clear this field on update, set the order line ID to 0. Order line ID that appears on the invoice. The order line must not be expired.
72 73 74 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 72 def order_line_id @order_line_id end |
#performance_plus_campaign_settings ⇒ Object
Pinterest Performance+ campaign settings.
75 76 77 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 75 def performance_plus_campaign_settings @performance_plus_campaign_settings end |
#start_time ⇒ Object
Timestamp in Unix format for scheduling when ads in the campaign start to appear. Must precede any start times set for child ad groups. Defaults to current time if no time is specified. Learn about scheduling campaigns. Different start times can be set for the campaign's child ad groups, but they cannot occur before a start_time specified for the campaign. - If your campaign has a child ad group with a start time specified, and if you update that campaign with a start_time that is later than that of the ad group, the campaign start_time will supersede the ad group start_time, and the request will not return an error. - In this scenario, if you call List campaigns or List ad groups, the returned campaigns or ad groups are listed with the start and end times that you assigned them, regardless of supersedence.
78 79 80 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 78 def start_time @start_time end |
#status ⇒ Object
Returns the value of attribute status.
80 81 82 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 80 def status @status end |
#summary_status ⇒ Object
Returns the value of attribute summary_status.
82 83 84 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 82 def summary_status @summary_status end |
#tracking_urls ⇒ Object
Returns the value of attribute tracking_urls.
84 85 86 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 84 def tracking_urls @tracking_urls end |
#type ⇒ Object
Always "campaign".
87 88 89 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 87 def type @type end |
#updated_time ⇒ Object
UTC timestamp. Last update time.
90 91 92 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 90 def updated_time @updated_time end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
147 148 149 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 147 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
152 153 154 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 152 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 115 def self.attribute_map { :'ad_account_id' => :'ad_account_id', :'bid_options' => :'bid_options', :'created_time' => :'created_time', :'daily_spend_cap' => :'daily_spend_cap', :'default_ad_group_budget_in_micro_currency' => :'default_ad_group_budget_in_micro_currency', :'end_time' => :'end_time', :'id' => :'id', :'intended_promotion_type' => :'intended_promotion_type', :'is_automated_campaign' => :'is_automated_campaign', :'is_campaign_budget_optimization' => :'is_campaign_budget_optimization', :'is_carting' => :'is_carting', :'is_flexible_daily_budgets' => :'is_flexible_daily_budgets', :'is_ltv_optimized' => :'is_ltv_optimized', :'is_performance_plus' => :'is_performance_plus', :'is_top_of_search' => :'is_top_of_search', :'lifetime_spend_cap' => :'lifetime_spend_cap', :'name' => :'name', :'objective_type' => :'objective_type', :'order_line_id' => :'order_line_id', :'performance_plus_campaign_settings' => :'performance_plus_campaign_settings', :'start_time' => :'start_time', :'status' => :'status', :'summary_status' => :'summary_status', :'tracking_urls' => :'tracking_urls', :'type' => :'type', :'updated_time' => :'updated_time' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 429 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
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 189 def self.openapi_nullable Set.new([ :'bid_options', :'daily_spend_cap', :'default_ad_group_budget_in_micro_currency', :'end_time', :'is_automated_campaign', :'is_campaign_budget_optimization', :'is_flexible_daily_budgets', :'lifetime_spend_cap', :'order_line_id', :'performance_plus_campaign_settings', :'start_time', :'status', :'tracking_urls', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 157 def self.openapi_types { :'ad_account_id' => :'String', :'bid_options' => :'CampaignBidOptions', :'created_time' => :'Integer', :'daily_spend_cap' => :'Integer', :'default_ad_group_budget_in_micro_currency' => :'Integer', :'end_time' => :'Integer', :'id' => :'String', :'intended_promotion_type' => :'IntendedPromotionType', :'is_automated_campaign' => :'Boolean', :'is_campaign_budget_optimization' => :'Boolean', :'is_carting' => :'Boolean', :'is_flexible_daily_budgets' => :'Boolean', :'is_ltv_optimized' => :'Boolean', :'is_performance_plus' => :'Boolean', :'is_top_of_search' => :'Boolean', :'lifetime_spend_cap' => :'Integer', :'name' => :'String', :'objective_type' => :'CampaignObjectiveType', :'order_line_id' => :'String', :'performance_plus_campaign_settings' => :'PerformancePlusCampaignSettings', :'start_time' => :'Integer', :'status' => :'NullableEntityStatus', :'summary_status' => :'SummaryStatus', :'tracking_urls' => :'TrackingUrls', :'type' => :'String', :'updated_time' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 383 def ==(o) return true if self.equal?(o) self.class == o.class && ad_account_id == o.ad_account_id && == o. && created_time == o.created_time && daily_spend_cap == o.daily_spend_cap && default_ad_group_budget_in_micro_currency == o.default_ad_group_budget_in_micro_currency && end_time == o.end_time && id == o.id && intended_promotion_type == o.intended_promotion_type && is_automated_campaign == o.is_automated_campaign && is_campaign_budget_optimization == o.is_campaign_budget_optimization && is_carting == o.is_carting && is_flexible_daily_budgets == o.is_flexible_daily_budgets && is_ltv_optimized == o.is_ltv_optimized && is_performance_plus == o.is_performance_plus && is_top_of_search == o.is_top_of_search && lifetime_spend_cap == o.lifetime_spend_cap && name == o.name && objective_type == o.objective_type && order_line_id == o.order_line_id && performance_plus_campaign_settings == o.performance_plus_campaign_settings && start_time == o.start_time && status == o.status && summary_status == o.summary_status && tracking_urls == o.tracking_urls && type == o.type && updated_time == o.updated_time end |
#eql?(o) ⇒ Boolean
416 417 418 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 416 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
422 423 424 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 422 def hash [ad_account_id, , created_time, daily_spend_cap, default_ad_group_budget_in_micro_currency, end_time, id, intended_promotion_type, is_automated_campaign, is_campaign_budget_optimization, is_carting, is_flexible_daily_budgets, is_ltv_optimized, is_performance_plus, is_top_of_search, lifetime_spend_cap, name, objective_type, order_line_id, performance_plus_campaign_settings, start_time, status, summary_status, tracking_urls, type, updated_time].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 330 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 pattern = Regexp.new(/^\d+$/) if !@order_line_id.nil? && @order_line_id !~ pattern invalid_properties.push("invalid value for \"order_line_id\", must conform to the pattern #{pattern}.") end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 451 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
348 349 350 351 352 353 |
# File 'lib/pinterest_sdk/models/campaign_batch_response_data.rb', line 348 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 !@order_line_id.nil? && @order_line_id !~ Regexp.new(/^\d+$/) true end |