Class: PinterestSdkClient::CatalogsFeedValidationErrors
- Inherits:
-
Object
- Object
- PinterestSdkClient::CatalogsFeedValidationErrors
- Defined in:
- lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb
Instance Attribute Summary collapse
-
#adult_invalid ⇒ Object
Returns the value of attribute adult_invalid.
-
#adwords_format_invalid ⇒ Object
Returns the value of attribute adwords_format_invalid.
-
#availability_invalid ⇒ Object
Returns the value of attribute availability_invalid.
-
#blocklisted_image_signature ⇒ Object
Returns the value of attribute blocklisted_image_signature.
-
#condition_invalid ⇒ Object
Returns the value of attribute condition_invalid.
-
#delimiter_error ⇒ Object
Returns the value of attribute delimiter_error.
-
#description_missing ⇒ Object
Returns the value of attribute description_missing.
-
#encoding_error ⇒ Object
Returns the value of attribute encoding_error.
-
#feed_length_too_long ⇒ Object
Returns the value of attribute feed_length_too_long.
-
#feed_too_small ⇒ Object
Returns the value of attribute feed_too_small.
-
#fetch_error ⇒ Object
Returns the value of attribute fetch_error.
-
#fetch_inactive_feed_error ⇒ Object
Returns the value of attribute fetch_inactive_feed_error.
-
#image_link_invalid ⇒ Object
Returns the value of attribute image_link_invalid.
-
#image_link_missing ⇒ Object
Returns the value of attribute image_link_missing.
-
#internal_service_error ⇒ Object
Returns the value of attribute internal_service_error.
-
#invalid_domain ⇒ Object
Returns the value of attribute invalid_domain.
-
#item_main_image_download_failure ⇒ Object
Returns the value of attribute item_main_image_download_failure.
-
#itemid_missing ⇒ Object
Returns the value of attribute itemid_missing.
-
#link_format_invalid ⇒ Object
Returns the value of attribute link_format_invalid.
-
#link_length_too_long ⇒ Object
Returns the value of attribute link_length_too_long.
-
#malformed_xml ⇒ Object
Returns the value of attribute malformed_xml.
-
#max_items_per_item_group_exceeded ⇒ Object
Returns the value of attribute max_items_per_item_group_exceeded.
-
#no_verified_domain ⇒ Object
Returns the value of attribute no_verified_domain.
-
#parse_line_error ⇒ Object
Returns the value of attribute parse_line_error.
-
#pinjoin_content_unsafe ⇒ Object
Returns the value of attribute pinjoin_content_unsafe.
-
#price_missing ⇒ Object
Returns the value of attribute price_missing.
-
#product_category_invalid ⇒ Object
Returns the value of attribute product_category_invalid.
-
#product_category_missing ⇒ Object
Returns the value of attribute product_category_missing.
-
#product_link_missing ⇒ Object
Returns the value of attribute product_link_missing.
-
#product_price_invalid ⇒ Object
Returns the value of attribute product_price_invalid.
-
#redirect_invalid ⇒ Object
Returns the value of attribute redirect_invalid.
-
#required_columns_missing ⇒ Object
Returns the value of attribute required_columns_missing.
-
#shopify_no_products ⇒ Object
Returns the value of attribute shopify_no_products.
-
#title_missing ⇒ Object
Returns the value of attribute title_missing.
Class Method Summary collapse
-
.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.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CatalogsFeedValidationErrors
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ CatalogsFeedValidationErrors
Initializes the object
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 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 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 179 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `PinterestSdkClient::CatalogsFeedValidationErrors` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `PinterestSdkClient::CatalogsFeedValidationErrors`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'fetch_error') self.fetch_error = attributes[:'fetch_error'] end if attributes.key?(:'fetch_inactive_feed_error') self.fetch_inactive_feed_error = attributes[:'fetch_inactive_feed_error'] end if attributes.key?(:'encoding_error') self.encoding_error = attributes[:'encoding_error'] end if attributes.key?(:'delimiter_error') self.delimiter_error = attributes[:'delimiter_error'] end if attributes.key?(:'required_columns_missing') self.required_columns_missing = attributes[:'required_columns_missing'] end if attributes.key?(:'image_link_invalid') self.image_link_invalid = attributes[:'image_link_invalid'] end if attributes.key?(:'itemid_missing') self.itemid_missing = attributes[:'itemid_missing'] end if attributes.key?(:'title_missing') self.title_missing = attributes[:'title_missing'] end if attributes.key?(:'description_missing') self.description_missing = attributes[:'description_missing'] end if attributes.key?(:'product_category_invalid') self.product_category_invalid = attributes[:'product_category_invalid'] end if attributes.key?(:'product_link_missing') self.product_link_missing = attributes[:'product_link_missing'] end if attributes.key?(:'image_link_missing') self.image_link_missing = attributes[:'image_link_missing'] end if attributes.key?(:'availability_invalid') self.availability_invalid = attributes[:'availability_invalid'] end if attributes.key?(:'product_price_invalid') self.product_price_invalid = attributes[:'product_price_invalid'] end if attributes.key?(:'link_format_invalid') self.link_format_invalid = attributes[:'link_format_invalid'] end if attributes.key?(:'parse_line_error') self.parse_line_error = attributes[:'parse_line_error'] end if attributes.key?(:'adwords_format_invalid') self.adwords_format_invalid = attributes[:'adwords_format_invalid'] end if attributes.key?(:'product_category_missing') self.product_category_missing = attributes[:'product_category_missing'] end if attributes.key?(:'internal_service_error') self.internal_service_error = attributes[:'internal_service_error'] end if attributes.key?(:'no_verified_domain') self.no_verified_domain = attributes[:'no_verified_domain'] end if attributes.key?(:'adult_invalid') self.adult_invalid = attributes[:'adult_invalid'] end if attributes.key?(:'invalid_domain') self.invalid_domain = attributes[:'invalid_domain'] end if attributes.key?(:'feed_length_too_long') self.feed_length_too_long = attributes[:'feed_length_too_long'] end if attributes.key?(:'link_length_too_long') self.link_length_too_long = attributes[:'link_length_too_long'] end if attributes.key?(:'malformed_xml') self.malformed_xml = attributes[:'malformed_xml'] end if attributes.key?(:'redirect_invalid') self.redirect_invalid = attributes[:'redirect_invalid'] end if attributes.key?(:'price_missing') self.price_missing = attributes[:'price_missing'] end if attributes.key?(:'feed_too_small') self.feed_too_small = attributes[:'feed_too_small'] end if attributes.key?(:'condition_invalid') self.condition_invalid = attributes[:'condition_invalid'] end if attributes.key?(:'shopify_no_products') self.shopify_no_products = attributes[:'shopify_no_products'] end if attributes.key?(:'max_items_per_item_group_exceeded') self.max_items_per_item_group_exceeded = attributes[:'max_items_per_item_group_exceeded'] end if attributes.key?(:'item_main_image_download_failure') self.item_main_image_download_failure = attributes[:'item_main_image_download_failure'] end if attributes.key?(:'pinjoin_content_unsafe') self.pinjoin_content_unsafe = attributes[:'pinjoin_content_unsafe'] end if attributes.key?(:'blocklisted_image_signature') self.blocklisted_image_signature = attributes[:'blocklisted_image_signature'] end end |
Instance Attribute Details
#adult_invalid ⇒ Object
Returns the value of attribute adult_invalid.
58 59 60 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 58 def adult_invalid @adult_invalid end |
#adwords_format_invalid ⇒ Object
Returns the value of attribute adwords_format_invalid.
50 51 52 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 50 def adwords_format_invalid @adwords_format_invalid end |
#availability_invalid ⇒ Object
Returns the value of attribute availability_invalid.
42 43 44 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 42 def availability_invalid @availability_invalid end |
#blocklisted_image_signature ⇒ Object
Returns the value of attribute blocklisted_image_signature.
84 85 86 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 84 def blocklisted_image_signature @blocklisted_image_signature end |
#condition_invalid ⇒ Object
Returns the value of attribute condition_invalid.
74 75 76 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 74 def condition_invalid @condition_invalid end |
#delimiter_error ⇒ Object
Returns the value of attribute delimiter_error.
24 25 26 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 24 def delimiter_error @delimiter_error end |
#description_missing ⇒ Object
Returns the value of attribute description_missing.
34 35 36 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 34 def description_missing @description_missing end |
#encoding_error ⇒ Object
Returns the value of attribute encoding_error.
22 23 24 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 22 def encoding_error @encoding_error end |
#feed_length_too_long ⇒ Object
Returns the value of attribute feed_length_too_long.
62 63 64 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 62 def feed_length_too_long @feed_length_too_long end |
#feed_too_small ⇒ Object
Returns the value of attribute feed_too_small.
72 73 74 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 72 def feed_too_small @feed_too_small end |
#fetch_error ⇒ Object
Returns the value of attribute fetch_error.
18 19 20 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 18 def fetch_error @fetch_error end |
#fetch_inactive_feed_error ⇒ Object
Returns the value of attribute fetch_inactive_feed_error.
20 21 22 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 20 def fetch_inactive_feed_error @fetch_inactive_feed_error end |
#image_link_invalid ⇒ Object
Returns the value of attribute image_link_invalid.
28 29 30 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 28 def image_link_invalid @image_link_invalid end |
#image_link_missing ⇒ Object
Returns the value of attribute image_link_missing.
40 41 42 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 40 def image_link_missing @image_link_missing end |
#internal_service_error ⇒ Object
Returns the value of attribute internal_service_error.
54 55 56 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 54 def internal_service_error @internal_service_error end |
#invalid_domain ⇒ Object
Returns the value of attribute invalid_domain.
60 61 62 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 60 def invalid_domain @invalid_domain end |
#item_main_image_download_failure ⇒ Object
Returns the value of attribute item_main_image_download_failure.
80 81 82 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 80 def item_main_image_download_failure @item_main_image_download_failure end |
#itemid_missing ⇒ Object
Returns the value of attribute itemid_missing.
30 31 32 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 30 def itemid_missing @itemid_missing end |
#link_format_invalid ⇒ Object
Returns the value of attribute link_format_invalid.
46 47 48 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 46 def link_format_invalid @link_format_invalid end |
#link_length_too_long ⇒ Object
Returns the value of attribute link_length_too_long.
64 65 66 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 64 def link_length_too_long @link_length_too_long end |
#malformed_xml ⇒ Object
Returns the value of attribute malformed_xml.
66 67 68 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 66 def malformed_xml @malformed_xml end |
#max_items_per_item_group_exceeded ⇒ Object
Returns the value of attribute max_items_per_item_group_exceeded.
78 79 80 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 78 def max_items_per_item_group_exceeded @max_items_per_item_group_exceeded end |
#no_verified_domain ⇒ Object
Returns the value of attribute no_verified_domain.
56 57 58 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 56 def no_verified_domain @no_verified_domain end |
#parse_line_error ⇒ Object
Returns the value of attribute parse_line_error.
48 49 50 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 48 def parse_line_error @parse_line_error end |
#pinjoin_content_unsafe ⇒ Object
Returns the value of attribute pinjoin_content_unsafe.
82 83 84 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 82 def pinjoin_content_unsafe @pinjoin_content_unsafe end |
#price_missing ⇒ Object
Returns the value of attribute price_missing.
70 71 72 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 70 def price_missing @price_missing end |
#product_category_invalid ⇒ Object
Returns the value of attribute product_category_invalid.
36 37 38 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 36 def product_category_invalid @product_category_invalid end |
#product_category_missing ⇒ Object
Returns the value of attribute product_category_missing.
52 53 54 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 52 def product_category_missing @product_category_missing end |
#product_link_missing ⇒ Object
Returns the value of attribute product_link_missing.
38 39 40 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 38 def product_link_missing @product_link_missing end |
#product_price_invalid ⇒ Object
Returns the value of attribute product_price_invalid.
44 45 46 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 44 def product_price_invalid @product_price_invalid end |
#redirect_invalid ⇒ Object
Returns the value of attribute redirect_invalid.
68 69 70 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 68 def redirect_invalid @redirect_invalid end |
#required_columns_missing ⇒ Object
Returns the value of attribute required_columns_missing.
26 27 28 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 26 def required_columns_missing @required_columns_missing end |
#shopify_no_products ⇒ Object
Returns the value of attribute shopify_no_products.
76 77 78 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 76 def shopify_no_products @shopify_no_products end |
#title_missing ⇒ Object
Returns the value of attribute title_missing.
32 33 34 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 32 def title_missing @title_missing end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
127 128 129 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 127 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 87 def self.attribute_map { :'fetch_error' => :'fetch_error', :'fetch_inactive_feed_error' => :'fetch_inactive_feed_error', :'encoding_error' => :'encoding_error', :'delimiter_error' => :'delimiter_error', :'required_columns_missing' => :'required_columns_missing', :'image_link_invalid' => :'image_link_invalid', :'itemid_missing' => :'itemid_missing', :'title_missing' => :'title_missing', :'description_missing' => :'description_missing', :'product_category_invalid' => :'product_category_invalid', :'product_link_missing' => :'product_link_missing', :'image_link_missing' => :'image_link_missing', :'availability_invalid' => :'availability_invalid', :'product_price_invalid' => :'product_price_invalid', :'link_format_invalid' => :'link_format_invalid', :'parse_line_error' => :'parse_line_error', :'adwords_format_invalid' => :'adwords_format_invalid', :'product_category_missing' => :'product_category_missing', :'internal_service_error' => :'internal_service_error', :'no_verified_domain' => :'no_verified_domain', :'adult_invalid' => :'adult_invalid', :'invalid_domain' => :'invalid_domain', :'feed_length_too_long' => :'feed_length_too_long', :'link_length_too_long' => :'link_length_too_long', :'malformed_xml' => :'malformed_xml', :'redirect_invalid' => :'redirect_invalid', :'price_missing' => :'price_missing', :'feed_too_small' => :'feed_too_small', :'condition_invalid' => :'condition_invalid', :'shopify_no_products' => :'shopify_no_products', :'max_items_per_item_group_exceeded' => :'max_items_per_item_group_exceeded', :'item_main_image_download_failure' => :'item_main_image_download_failure', :'pinjoin_content_unsafe' => :'pinjoin_content_unsafe', :'blocklisted_image_signature' => :'blocklisted_image_signature' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
398 399 400 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 398 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
172 173 174 175 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 172 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 167 168 169 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 132 def self.openapi_types { :'fetch_error' => :'Integer', :'fetch_inactive_feed_error' => :'Integer', :'encoding_error' => :'Integer', :'delimiter_error' => :'Integer', :'required_columns_missing' => :'Integer', :'image_link_invalid' => :'Integer', :'itemid_missing' => :'Integer', :'title_missing' => :'Integer', :'description_missing' => :'Integer', :'product_category_invalid' => :'Integer', :'product_link_missing' => :'Integer', :'image_link_missing' => :'Integer', :'availability_invalid' => :'Integer', :'product_price_invalid' => :'Integer', :'link_format_invalid' => :'Integer', :'parse_line_error' => :'Integer', :'adwords_format_invalid' => :'Integer', :'product_category_missing' => :'Integer', :'internal_service_error' => :'Integer', :'no_verified_domain' => :'Integer', :'adult_invalid' => :'Integer', :'invalid_domain' => :'Integer', :'feed_length_too_long' => :'Integer', :'link_length_too_long' => :'Integer', :'malformed_xml' => :'Integer', :'redirect_invalid' => :'Integer', :'price_missing' => :'Integer', :'feed_too_small' => :'Integer', :'condition_invalid' => :'Integer', :'shopify_no_products' => :'Integer', :'max_items_per_item_group_exceeded' => :'Integer', :'item_main_image_download_failure' => :'Integer', :'pinjoin_content_unsafe' => :'Integer', :'blocklisted_image_signature' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 344 def ==(o) return true if self.equal?(o) self.class == o.class && fetch_error == o.fetch_error && fetch_inactive_feed_error == o.fetch_inactive_feed_error && encoding_error == o.encoding_error && delimiter_error == o.delimiter_error && required_columns_missing == o.required_columns_missing && image_link_invalid == o.image_link_invalid && itemid_missing == o.itemid_missing && title_missing == o.title_missing && description_missing == o.description_missing && product_category_invalid == o.product_category_invalid && product_link_missing == o.product_link_missing && image_link_missing == o.image_link_missing && availability_invalid == o.availability_invalid && product_price_invalid == o.product_price_invalid && link_format_invalid == o.link_format_invalid && parse_line_error == o.parse_line_error && adwords_format_invalid == o.adwords_format_invalid && product_category_missing == o.product_category_missing && internal_service_error == o.internal_service_error && no_verified_domain == o.no_verified_domain && adult_invalid == o.adult_invalid && invalid_domain == o.invalid_domain && feed_length_too_long == o.feed_length_too_long && link_length_too_long == o.link_length_too_long && malformed_xml == o.malformed_xml && redirect_invalid == o.redirect_invalid && price_missing == o.price_missing && feed_too_small == o.feed_too_small && condition_invalid == o.condition_invalid && shopify_no_products == o.shopify_no_products && max_items_per_item_group_exceeded == o.max_items_per_item_group_exceeded && item_main_image_download_failure == o.item_main_image_download_failure && pinjoin_content_unsafe == o.pinjoin_content_unsafe && blocklisted_image_signature == o.blocklisted_image_signature end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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/catalogs_feed_validation_errors.rb', line 428 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = PinterestSdkClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
499 500 501 502 503 504 505 506 507 508 509 510 511 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 499 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 405 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{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[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
385 386 387 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 385 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
391 392 393 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 391 def hash [fetch_error, fetch_inactive_feed_error, encoding_error, delimiter_error, required_columns_missing, image_link_invalid, itemid_missing, title_missing, description_missing, product_category_invalid, product_link_missing, image_link_missing, availability_invalid, product_price_invalid, link_format_invalid, parse_line_error, adwords_format_invalid, product_category_missing, internal_service_error, no_verified_domain, adult_invalid, invalid_domain, feed_length_too_long, link_length_too_long, malformed_xml, redirect_invalid, price_missing, feed_too_small, condition_invalid, shopify_no_products, max_items_per_item_group_exceeded, item_main_image_download_failure, pinjoin_content_unsafe, blocklisted_image_signature].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
331 332 333 334 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 331 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
475 476 477 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 475 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
481 482 483 484 485 486 487 488 489 490 491 492 493 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 481 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 |
#to_s ⇒ String
Returns the string representation of the object
469 470 471 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 469 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
338 339 340 |
# File 'lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb', line 338 def valid? true end |