Class: PinterestSdkClient::CatalogsItemValidationErrors
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- PinterestSdkClient::CatalogsItemValidationErrors
- Defined in:
- lib/pinterest_sdk/models/catalogs_item_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.
-
#description_missing ⇒ Object
Returns the value of attribute description_missing.
-
#duplicate_products ⇒ Object
Returns the value of attribute duplicate_products.
-
#image_link_invalid ⇒ Object
Returns the value of attribute image_link_invalid.
-
#image_link_length_too_long ⇒ Object
Returns the value of attribute image_link_length_too_long.
-
#image_link_missing ⇒ Object
Returns the value of attribute image_link_missing.
-
#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.
-
#list_price_invalid ⇒ Object
Returns the value of attribute list_price_invalid.
-
#max_items_per_item_group_exceeded ⇒ Object
Returns the value of attribute max_items_per_item_group_exceeded.
-
#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_cannot_be_determined ⇒ Object
Returns the value of attribute price_cannot_be_determined.
-
#price_missing ⇒ Object
Returns the value of attribute price_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.
-
#title_missing ⇒ Object
Returns the value of attribute title_missing.
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 = {}) ⇒ CatalogsItemValidationErrors
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 = {}) ⇒ CatalogsItemValidationErrors
Initializes the object
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 170 171 172 173 174 175 176 177 178 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 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 140 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `PinterestSdkClient::CatalogsItemValidationErrors` 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::CatalogsItemValidationErrors`. 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?(:'adult_invalid') self.adult_invalid = attributes[:'adult_invalid'] end if attributes.key?(:'adwords_format_invalid') self.adwords_format_invalid = attributes[:'adwords_format_invalid'] end if attributes.key?(:'availability_invalid') self.availability_invalid = attributes[:'availability_invalid'] end if attributes.key?(:'blocklisted_image_signature') self.blocklisted_image_signature = attributes[:'blocklisted_image_signature'] end if attributes.key?(:'description_missing') self.description_missing = attributes[:'description_missing'] end if attributes.key?(:'duplicate_products') self.duplicate_products = attributes[:'duplicate_products'] end if attributes.key?(:'image_link_invalid') self.image_link_invalid = attributes[:'image_link_invalid'] end if attributes.key?(:'image_link_length_too_long') self.image_link_length_too_long = attributes[:'image_link_length_too_long'] end if attributes.key?(:'image_link_missing') self.image_link_missing = attributes[:'image_link_missing'] end if attributes.key?(:'invalid_domain') self.invalid_domain = attributes[:'invalid_domain'] 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?(:'itemid_missing') self.itemid_missing = attributes[:'itemid_missing'] end if attributes.key?(:'link_format_invalid') self.link_format_invalid = attributes[:'link_format_invalid'] end if attributes.key?(:'link_length_too_long') self.link_length_too_long = attributes[:'link_length_too_long'] end if attributes.key?(:'list_price_invalid') self.list_price_invalid = attributes[:'list_price_invalid'] 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?(:'parse_line_error') self.parse_line_error = attributes[:'parse_line_error'] end if attributes.key?(:'pinjoin_content_unsafe') self.pinjoin_content_unsafe = attributes[:'pinjoin_content_unsafe'] end if attributes.key?(:'price_cannot_be_determined') self.price_cannot_be_determined = attributes[:'price_cannot_be_determined'] end if attributes.key?(:'price_missing') self.price_missing = attributes[:'price_missing'] end if attributes.key?(:'product_link_missing') self.product_link_missing = attributes[:'product_link_missing'] end if attributes.key?(:'product_price_invalid') self.product_price_invalid = attributes[:'product_price_invalid'] end if attributes.key?(:'title_missing') self.title_missing = attributes[:'title_missing'] end end |
Instance Attribute Details
#adult_invalid ⇒ Object
Returns the value of attribute adult_invalid.
18 19 20 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 18 def adult_invalid @adult_invalid end |
#adwords_format_invalid ⇒ Object
Returns the value of attribute adwords_format_invalid.
20 21 22 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 20 def adwords_format_invalid @adwords_format_invalid end |
#availability_invalid ⇒ Object
Returns the value of attribute availability_invalid.
22 23 24 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 22 def availability_invalid @availability_invalid end |
#blocklisted_image_signature ⇒ Object
Returns the value of attribute blocklisted_image_signature.
24 25 26 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 24 def blocklisted_image_signature @blocklisted_image_signature end |
#description_missing ⇒ Object
Returns the value of attribute description_missing.
26 27 28 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 26 def description_missing @description_missing end |
#duplicate_products ⇒ Object
Returns the value of attribute duplicate_products.
28 29 30 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 28 def duplicate_products @duplicate_products end |
#image_link_invalid ⇒ Object
Returns the value of attribute image_link_invalid.
30 31 32 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 30 def image_link_invalid @image_link_invalid end |
#image_link_length_too_long ⇒ Object
Returns the value of attribute image_link_length_too_long.
32 33 34 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 32 def image_link_length_too_long @image_link_length_too_long end |
#image_link_missing ⇒ Object
Returns the value of attribute image_link_missing.
34 35 36 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 34 def image_link_missing @image_link_missing end |
#invalid_domain ⇒ Object
Returns the value of attribute invalid_domain.
36 37 38 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 36 def invalid_domain @invalid_domain end |
#item_main_image_download_failure ⇒ Object
Returns the value of attribute item_main_image_download_failure.
38 39 40 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 38 def item_main_image_download_failure @item_main_image_download_failure end |
#itemid_missing ⇒ Object
Returns the value of attribute itemid_missing.
40 41 42 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 40 def itemid_missing @itemid_missing end |
#link_format_invalid ⇒ Object
Returns the value of attribute link_format_invalid.
42 43 44 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 42 def link_format_invalid @link_format_invalid end |
#link_length_too_long ⇒ Object
Returns the value of attribute link_length_too_long.
44 45 46 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 44 def link_length_too_long @link_length_too_long end |
#list_price_invalid ⇒ Object
Returns the value of attribute list_price_invalid.
46 47 48 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 46 def list_price_invalid @list_price_invalid end |
#max_items_per_item_group_exceeded ⇒ Object
Returns the value of attribute max_items_per_item_group_exceeded.
48 49 50 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 48 def max_items_per_item_group_exceeded @max_items_per_item_group_exceeded end |
#parse_line_error ⇒ Object
Returns the value of attribute parse_line_error.
50 51 52 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 50 def parse_line_error @parse_line_error end |
#pinjoin_content_unsafe ⇒ Object
Returns the value of attribute pinjoin_content_unsafe.
52 53 54 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 52 def pinjoin_content_unsafe @pinjoin_content_unsafe end |
#price_cannot_be_determined ⇒ Object
Returns the value of attribute price_cannot_be_determined.
54 55 56 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 54 def price_cannot_be_determined @price_cannot_be_determined end |
#price_missing ⇒ Object
Returns the value of attribute price_missing.
56 57 58 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 56 def price_missing @price_missing end |
#product_link_missing ⇒ Object
Returns the value of attribute product_link_missing.
58 59 60 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 58 def product_link_missing @product_link_missing end |
#product_price_invalid ⇒ Object
Returns the value of attribute product_price_invalid.
60 61 62 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 60 def product_price_invalid @product_price_invalid end |
#title_missing ⇒ Object
Returns the value of attribute title_missing.
62 63 64 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 62 def title_missing @title_missing end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
94 95 96 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 94 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
99 100 101 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 99 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 65 def self.attribute_map { :'adult_invalid' => :'ADULT_INVALID', :'adwords_format_invalid' => :'ADWORDS_FORMAT_INVALID', :'availability_invalid' => :'AVAILABILITY_INVALID', :'blocklisted_image_signature' => :'BLOCKLISTED_IMAGE_SIGNATURE', :'description_missing' => :'DESCRIPTION_MISSING', :'duplicate_products' => :'DUPLICATE_PRODUCTS', :'image_link_invalid' => :'IMAGE_LINK_INVALID', :'image_link_length_too_long' => :'IMAGE_LINK_LENGTH_TOO_LONG', :'image_link_missing' => :'IMAGE_LINK_MISSING', :'invalid_domain' => :'INVALID_DOMAIN', :'item_main_image_download_failure' => :'ITEM_MAIN_IMAGE_DOWNLOAD_FAILURE', :'itemid_missing' => :'ITEMID_MISSING', :'link_format_invalid' => :'LINK_FORMAT_INVALID', :'link_length_too_long' => :'LINK_LENGTH_TOO_LONG', :'list_price_invalid' => :'LIST_PRICE_INVALID', :'max_items_per_item_group_exceeded' => :'MAX_ITEMS_PER_ITEM_GROUP_EXCEEDED', :'parse_line_error' => :'PARSE_LINE_ERROR', :'pinjoin_content_unsafe' => :'PINJOIN_CONTENT_UNSAFE', :'price_cannot_be_determined' => :'PRICE_CANNOT_BE_DETERMINED', :'price_missing' => :'PRICE_MISSING', :'product_link_missing' => :'PRODUCT_LINK_MISSING', :'product_price_invalid' => :'PRODUCT_PRICE_INVALID', :'title_missing' => :'TITLE_MISSING' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 307 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
133 134 135 136 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 133 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 104 def self.openapi_types { :'adult_invalid' => :'CatalogsItemValidationDetails', :'adwords_format_invalid' => :'CatalogsItemValidationDetails', :'availability_invalid' => :'CatalogsItemValidationDetails', :'blocklisted_image_signature' => :'CatalogsItemValidationDetails', :'description_missing' => :'CatalogsItemValidationDetails', :'duplicate_products' => :'CatalogsItemValidationDetails', :'image_link_invalid' => :'CatalogsItemValidationDetails', :'image_link_length_too_long' => :'CatalogsItemValidationDetails', :'image_link_missing' => :'CatalogsItemValidationDetails', :'invalid_domain' => :'CatalogsItemValidationDetails', :'item_main_image_download_failure' => :'CatalogsItemValidationDetails', :'itemid_missing' => :'CatalogsItemValidationDetails', :'link_format_invalid' => :'CatalogsItemValidationDetails', :'link_length_too_long' => :'CatalogsItemValidationDetails', :'list_price_invalid' => :'CatalogsItemValidationDetails', :'max_items_per_item_group_exceeded' => :'CatalogsItemValidationDetails', :'parse_line_error' => :'CatalogsItemValidationDetails', :'pinjoin_content_unsafe' => :'CatalogsItemValidationDetails', :'price_cannot_be_determined' => :'CatalogsItemValidationDetails', :'price_missing' => :'CatalogsItemValidationDetails', :'product_link_missing' => :'CatalogsItemValidationDetails', :'product_price_invalid' => :'CatalogsItemValidationDetails', :'title_missing' => :'CatalogsItemValidationDetails' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 264 def ==(o) return true if self.equal?(o) self.class == o.class && adult_invalid == o.adult_invalid && adwords_format_invalid == o.adwords_format_invalid && availability_invalid == o.availability_invalid && blocklisted_image_signature == o.blocklisted_image_signature && description_missing == o.description_missing && duplicate_products == o.duplicate_products && image_link_invalid == o.image_link_invalid && image_link_length_too_long == o.image_link_length_too_long && image_link_missing == o.image_link_missing && invalid_domain == o.invalid_domain && item_main_image_download_failure == o.item_main_image_download_failure && itemid_missing == o.itemid_missing && link_format_invalid == o.link_format_invalid && link_length_too_long == o.link_length_too_long && list_price_invalid == o.list_price_invalid && max_items_per_item_group_exceeded == o.max_items_per_item_group_exceeded && parse_line_error == o.parse_line_error && pinjoin_content_unsafe == o.pinjoin_content_unsafe && price_cannot_be_determined == o.price_cannot_be_determined && price_missing == o.price_missing && product_link_missing == o.product_link_missing && product_price_invalid == o.product_price_invalid && title_missing == o.title_missing end |
#eql?(o) ⇒ Boolean
294 295 296 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 294 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
300 301 302 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 300 def hash [adult_invalid, adwords_format_invalid, availability_invalid, blocklisted_image_signature, description_missing, duplicate_products, image_link_invalid, image_link_length_too_long, image_link_missing, invalid_domain, item_main_image_download_failure, itemid_missing, link_format_invalid, link_length_too_long, list_price_invalid, max_items_per_item_group_exceeded, parse_line_error, pinjoin_content_unsafe, price_cannot_be_determined, price_missing, product_link_missing, product_price_invalid, title_missing].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
249 250 251 252 253 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 249 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 329 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
257 258 259 260 |
# File 'lib/pinterest_sdk/models/catalogs_item_validation_errors.rb', line 257 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |