Class: UltracartClient::ItemGoogleProductSearch
- Inherits:
-
Object
- Object
- UltracartClient::ItemGoogleProductSearch
- Defined in:
- lib/ultracart_api/models/item_google_product_search.rb
Instance Attribute Summary collapse
-
#adwords_grouping ⇒ Object
Adwords grouping.
-
#adwords_label1 ⇒ Object
Adwords label 1.
-
#adwords_label2 ⇒ Object
Adwords label 2.
-
#adwords_label3 ⇒ Object
Adwords label 3.
-
#adwords_label4 ⇒ Object
Adwords label 4.
-
#adwords_label5 ⇒ Object
Adwords label 5.
-
#age_group ⇒ Object
Age group.
-
#available_at_physical_store ⇒ Object
Available at physical store.
-
#book_author ⇒ Object
Book - author.
-
#book_format ⇒ Object
Book - format.
-
#book_isbn ⇒ Object
Bood - ISBN.
-
#book_publisher ⇒ Object
Book - publisher.
-
#category_description ⇒ Object
Category description.
-
#color ⇒ Object
Color.
-
#condition ⇒ Object
Condition.
-
#custom_label0 ⇒ Object
Custom label 0.
-
#custom_label1 ⇒ Object
Custom label 1.
-
#custom_label2 ⇒ Object
Custom label 2.
-
#custom_label3 ⇒ Object
Custom label 3.
-
#custom_label4 ⇒ Object
Custom label 4.
-
#gender ⇒ Object
Gender.
-
#google_product_category ⇒ Object
Google product category.
-
#music_artist ⇒ Object
Music - artist.
-
#music_format ⇒ Object
Music - format.
-
#music_release_date ⇒ Object
Music - release date.
-
#omit_from_feed ⇒ Object
Omit from feed.
-
#product_type ⇒ Object
Product type.
-
#promotion_id1 ⇒ Object
Promotion ID 1.
-
#promotion_id10 ⇒ Object
Promotion ID 10.
-
#promotion_id2 ⇒ Object
Promotion ID 2.
-
#promotion_id3 ⇒ Object
Promotion ID 3.
-
#promotion_id4 ⇒ Object
Promotion ID 4.
-
#promotion_id5 ⇒ Object
Promotion ID 5.
-
#promotion_id6 ⇒ Object
Promotion ID 6.
-
#promotion_id7 ⇒ Object
Promotion ID 7.
-
#promotion_id8 ⇒ Object
Promotion ID 8.
-
#promotion_id9 ⇒ Object
Promotion ID 9.
-
#search_dts ⇒ Object
Search date/time.
-
#search_lowest_price ⇒ Object
Search lowest price.
-
#search_lowest_url ⇒ Object
Search lowest URL.
-
#search_position ⇒ Object
Search position.
-
#shipping_label ⇒ Object
Returns the value of attribute shipping_label.
-
#size ⇒ Object
Size.
-
#video_director ⇒ Object
Video - director.
-
#video_format ⇒ Object
Video - format.
-
#video_rating ⇒ Object
Video - rating.
-
#video_release_date ⇒ Object
Video - release date.
-
#video_starring ⇒ Object
Video - starring.
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 = {}) ⇒ ItemGoogleProductSearch
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 = {}) ⇒ ItemGoogleProductSearch
Initializes the object
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 282 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ItemGoogleProductSearch` 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 `UltracartClient::ItemGoogleProductSearch`. 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?(:'adwords_grouping') self.adwords_grouping = attributes[:'adwords_grouping'] end if attributes.key?(:'adwords_label1') self.adwords_label1 = attributes[:'adwords_label1'] end if attributes.key?(:'adwords_label2') self.adwords_label2 = attributes[:'adwords_label2'] end if attributes.key?(:'adwords_label3') self.adwords_label3 = attributes[:'adwords_label3'] end if attributes.key?(:'adwords_label4') self.adwords_label4 = attributes[:'adwords_label4'] end if attributes.key?(:'adwords_label5') self.adwords_label5 = attributes[:'adwords_label5'] end if attributes.key?(:'age_group') self.age_group = attributes[:'age_group'] end if attributes.key?(:'available_at_physical_store') self.available_at_physical_store = attributes[:'available_at_physical_store'] end if attributes.key?(:'book_author') self. = attributes[:'book_author'] end if attributes.key?(:'book_format') self.book_format = attributes[:'book_format'] end if attributes.key?(:'book_isbn') self.book_isbn = attributes[:'book_isbn'] end if attributes.key?(:'book_publisher') self.book_publisher = attributes[:'book_publisher'] end if attributes.key?(:'category_description') self.category_description = attributes[:'category_description'] end if attributes.key?(:'color') self.color = attributes[:'color'] end if attributes.key?(:'condition') self.condition = attributes[:'condition'] end if attributes.key?(:'custom_label0') self.custom_label0 = attributes[:'custom_label0'] end if attributes.key?(:'custom_label1') self.custom_label1 = attributes[:'custom_label1'] end if attributes.key?(:'custom_label2') self.custom_label2 = attributes[:'custom_label2'] end if attributes.key?(:'custom_label3') self.custom_label3 = attributes[:'custom_label3'] end if attributes.key?(:'custom_label4') self.custom_label4 = attributes[:'custom_label4'] end if attributes.key?(:'gender') self.gender = attributes[:'gender'] end if attributes.key?(:'google_product_category') self.google_product_category = attributes[:'google_product_category'] end if attributes.key?(:'music_artist') self.music_artist = attributes[:'music_artist'] end if attributes.key?(:'music_format') self.music_format = attributes[:'music_format'] end if attributes.key?(:'music_release_date') self.music_release_date = attributes[:'music_release_date'] end if attributes.key?(:'omit_from_feed') self.omit_from_feed = attributes[:'omit_from_feed'] end if attributes.key?(:'product_type') self.product_type = attributes[:'product_type'] end if attributes.key?(:'promotion_id1') self.promotion_id1 = attributes[:'promotion_id1'] end if attributes.key?(:'promotion_id10') self.promotion_id10 = attributes[:'promotion_id10'] end if attributes.key?(:'promotion_id2') self.promotion_id2 = attributes[:'promotion_id2'] end if attributes.key?(:'promotion_id3') self.promotion_id3 = attributes[:'promotion_id3'] end if attributes.key?(:'promotion_id4') self.promotion_id4 = attributes[:'promotion_id4'] end if attributes.key?(:'promotion_id5') self.promotion_id5 = attributes[:'promotion_id5'] end if attributes.key?(:'promotion_id6') self.promotion_id6 = attributes[:'promotion_id6'] end if attributes.key?(:'promotion_id7') self.promotion_id7 = attributes[:'promotion_id7'] end if attributes.key?(:'promotion_id8') self.promotion_id8 = attributes[:'promotion_id8'] end if attributes.key?(:'promotion_id9') self.promotion_id9 = attributes[:'promotion_id9'] end if attributes.key?(:'search_dts') self.search_dts = attributes[:'search_dts'] end if attributes.key?(:'search_lowest_price') self.search_lowest_price = attributes[:'search_lowest_price'] end if attributes.key?(:'search_lowest_url') self.search_lowest_url = attributes[:'search_lowest_url'] end if attributes.key?(:'search_position') self.search_position = attributes[:'search_position'] end if attributes.key?(:'shipping_label') self.shipping_label = attributes[:'shipping_label'] end if attributes.key?(:'size') self.size = attributes[:'size'] end if attributes.key?(:'video_director') self.video_director = attributes[:'video_director'] end if attributes.key?(:'video_format') self.video_format = attributes[:'video_format'] end if attributes.key?(:'video_rating') self. = attributes[:'video_rating'] end if attributes.key?(:'video_release_date') self.video_release_date = attributes[:'video_release_date'] end if attributes.key?(:'video_starring') self.video_starring = attributes[:'video_starring'] end end |
Instance Attribute Details
#adwords_grouping ⇒ Object
Adwords grouping
19 20 21 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 19 def adwords_grouping @adwords_grouping end |
#adwords_label1 ⇒ Object
Adwords label 1
22 23 24 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 22 def adwords_label1 @adwords_label1 end |
#adwords_label2 ⇒ Object
Adwords label 2
25 26 27 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 25 def adwords_label2 @adwords_label2 end |
#adwords_label3 ⇒ Object
Adwords label 3
28 29 30 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 28 def adwords_label3 @adwords_label3 end |
#adwords_label4 ⇒ Object
Adwords label 4
31 32 33 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 31 def adwords_label4 @adwords_label4 end |
#adwords_label5 ⇒ Object
Adwords label 5
34 35 36 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 34 def adwords_label5 @adwords_label5 end |
#age_group ⇒ Object
Age group
37 38 39 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 37 def age_group @age_group end |
#available_at_physical_store ⇒ Object
Available at physical store
40 41 42 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 40 def available_at_physical_store @available_at_physical_store end |
#book_author ⇒ Object
Book - author
43 44 45 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 43 def @book_author end |
#book_format ⇒ Object
Book - format
46 47 48 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 46 def book_format @book_format end |
#book_isbn ⇒ Object
Bood - ISBN
49 50 51 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 49 def book_isbn @book_isbn end |
#book_publisher ⇒ Object
Book - publisher
52 53 54 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 52 def book_publisher @book_publisher end |
#category_description ⇒ Object
Category description
55 56 57 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 55 def category_description @category_description end |
#color ⇒ Object
Color
58 59 60 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 58 def color @color end |
#condition ⇒ Object
Condition
61 62 63 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 61 def condition @condition end |
#custom_label0 ⇒ Object
Custom label 0
64 65 66 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 64 def custom_label0 @custom_label0 end |
#custom_label1 ⇒ Object
Custom label 1
67 68 69 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 67 def custom_label1 @custom_label1 end |
#custom_label2 ⇒ Object
Custom label 2
70 71 72 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 70 def custom_label2 @custom_label2 end |
#custom_label3 ⇒ Object
Custom label 3
73 74 75 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 73 def custom_label3 @custom_label3 end |
#custom_label4 ⇒ Object
Custom label 4
76 77 78 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 76 def custom_label4 @custom_label4 end |
#gender ⇒ Object
Gender
79 80 81 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 79 def gender @gender end |
#google_product_category ⇒ Object
Google product category
82 83 84 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 82 def google_product_category @google_product_category end |
#music_artist ⇒ Object
Music - artist
85 86 87 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 85 def music_artist @music_artist end |
#music_format ⇒ Object
Music - format
88 89 90 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 88 def music_format @music_format end |
#music_release_date ⇒ Object
Music - release date
91 92 93 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 91 def music_release_date @music_release_date end |
#omit_from_feed ⇒ Object
Omit from feed
94 95 96 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 94 def omit_from_feed @omit_from_feed end |
#product_type ⇒ Object
Product type
97 98 99 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 97 def product_type @product_type end |
#promotion_id1 ⇒ Object
Promotion ID 1
100 101 102 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 100 def promotion_id1 @promotion_id1 end |
#promotion_id10 ⇒ Object
Promotion ID 10
103 104 105 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 103 def promotion_id10 @promotion_id10 end |
#promotion_id2 ⇒ Object
Promotion ID 2
106 107 108 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 106 def promotion_id2 @promotion_id2 end |
#promotion_id3 ⇒ Object
Promotion ID 3
109 110 111 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 109 def promotion_id3 @promotion_id3 end |
#promotion_id4 ⇒ Object
Promotion ID 4
112 113 114 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 112 def promotion_id4 @promotion_id4 end |
#promotion_id5 ⇒ Object
Promotion ID 5
115 116 117 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 115 def promotion_id5 @promotion_id5 end |
#promotion_id6 ⇒ Object
Promotion ID 6
118 119 120 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 118 def promotion_id6 @promotion_id6 end |
#promotion_id7 ⇒ Object
Promotion ID 7
121 122 123 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 121 def promotion_id7 @promotion_id7 end |
#promotion_id8 ⇒ Object
Promotion ID 8
124 125 126 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 124 def promotion_id8 @promotion_id8 end |
#promotion_id9 ⇒ Object
Promotion ID 9
127 128 129 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 127 def promotion_id9 @promotion_id9 end |
#search_dts ⇒ Object
Search date/time
130 131 132 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 130 def search_dts @search_dts end |
#search_lowest_price ⇒ Object
Search lowest price
133 134 135 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 133 def search_lowest_price @search_lowest_price end |
#search_lowest_url ⇒ Object
Search lowest URL
136 137 138 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 136 def search_lowest_url @search_lowest_url end |
#search_position ⇒ Object
Search position
139 140 141 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 139 def search_position @search_position end |
#shipping_label ⇒ Object
Returns the value of attribute shipping_label.
141 142 143 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 141 def shipping_label @shipping_label end |
#size ⇒ Object
Size
144 145 146 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 144 def size @size end |
#video_director ⇒ Object
Video - director
147 148 149 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 147 def video_director @video_director end |
#video_format ⇒ Object
Video - format
150 151 152 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 150 def video_format @video_format end |
#video_rating ⇒ Object
Video - rating
153 154 155 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 153 def @video_rating end |
#video_release_date ⇒ Object
Video - release date
156 157 158 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 156 def video_release_date @video_release_date end |
#video_starring ⇒ Object
Video - starring
159 160 161 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 159 def video_starring @video_starring end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
216 217 218 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 216 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 162 def self.attribute_map { :'adwords_grouping' => :'adwords_grouping', :'adwords_label1' => :'adwords_label1', :'adwords_label2' => :'adwords_label2', :'adwords_label3' => :'adwords_label3', :'adwords_label4' => :'adwords_label4', :'adwords_label5' => :'adwords_label5', :'age_group' => :'age_group', :'available_at_physical_store' => :'available_at_physical_store', :'book_author' => :'book_author', :'book_format' => :'book_format', :'book_isbn' => :'book_isbn', :'book_publisher' => :'book_publisher', :'category_description' => :'category_description', :'color' => :'color', :'condition' => :'condition', :'custom_label0' => :'custom_label0', :'custom_label1' => :'custom_label1', :'custom_label2' => :'custom_label2', :'custom_label3' => :'custom_label3', :'custom_label4' => :'custom_label4', :'gender' => :'gender', :'google_product_category' => :'google_product_category', :'music_artist' => :'music_artist', :'music_format' => :'music_format', :'music_release_date' => :'music_release_date', :'omit_from_feed' => :'omit_from_feed', :'product_type' => :'product_type', :'promotion_id1' => :'promotion_id1', :'promotion_id10' => :'promotion_id10', :'promotion_id2' => :'promotion_id2', :'promotion_id3' => :'promotion_id3', :'promotion_id4' => :'promotion_id4', :'promotion_id5' => :'promotion_id5', :'promotion_id6' => :'promotion_id6', :'promotion_id7' => :'promotion_id7', :'promotion_id8' => :'promotion_id8', :'promotion_id9' => :'promotion_id9', :'search_dts' => :'search_dts', :'search_lowest_price' => :'search_lowest_price', :'search_lowest_url' => :'search_lowest_url', :'search_position' => :'search_position', :'shipping_label' => :'shippingLabel', :'size' => :'size', :'video_director' => :'video_director', :'video_format' => :'video_format', :'video_rating' => :'video_rating', :'video_release_date' => :'video_release_date', :'video_starring' => :'video_starring' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
1171 1172 1173 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1171 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
275 276 277 278 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 275 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 221 def self.openapi_types { :'adwords_grouping' => :'String', :'adwords_label1' => :'String', :'adwords_label2' => :'String', :'adwords_label3' => :'String', :'adwords_label4' => :'String', :'adwords_label5' => :'String', :'age_group' => :'String', :'available_at_physical_store' => :'Boolean', :'book_author' => :'String', :'book_format' => :'String', :'book_isbn' => :'String', :'book_publisher' => :'String', :'category_description' => :'String', :'color' => :'String', :'condition' => :'String', :'custom_label0' => :'String', :'custom_label1' => :'String', :'custom_label2' => :'String', :'custom_label3' => :'String', :'custom_label4' => :'String', :'gender' => :'String', :'google_product_category' => :'String', :'music_artist' => :'String', :'music_format' => :'String', :'music_release_date' => :'String', :'omit_from_feed' => :'Boolean', :'product_type' => :'String', :'promotion_id1' => :'String', :'promotion_id10' => :'String', :'promotion_id2' => :'String', :'promotion_id3' => :'String', :'promotion_id4' => :'String', :'promotion_id5' => :'String', :'promotion_id6' => :'String', :'promotion_id7' => :'String', :'promotion_id8' => :'String', :'promotion_id9' => :'String', :'search_dts' => :'String', :'search_lowest_price' => :'Float', :'search_lowest_url' => :'String', :'search_position' => :'Integer', :'shipping_label' => :'String', :'size' => :'String', :'video_director' => :'String', :'video_format' => :'String', :'video_rating' => :'String', :'video_release_date' => :'String', :'video_starring' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1103 def ==(o) return true if self.equal?(o) self.class == o.class && adwords_grouping == o.adwords_grouping && adwords_label1 == o.adwords_label1 && adwords_label2 == o.adwords_label2 && adwords_label3 == o.adwords_label3 && adwords_label4 == o.adwords_label4 && adwords_label5 == o.adwords_label5 && age_group == o.age_group && available_at_physical_store == o.available_at_physical_store && == o. && book_format == o.book_format && book_isbn == o.book_isbn && book_publisher == o.book_publisher && category_description == o.category_description && color == o.color && condition == o.condition && custom_label0 == o.custom_label0 && custom_label1 == o.custom_label1 && custom_label2 == o.custom_label2 && custom_label3 == o.custom_label3 && custom_label4 == o.custom_label4 && gender == o.gender && google_product_category == o.google_product_category && music_artist == o.music_artist && music_format == o.music_format && music_release_date == o.music_release_date && omit_from_feed == o.omit_from_feed && product_type == o.product_type && promotion_id1 == o.promotion_id1 && promotion_id10 == o.promotion_id10 && promotion_id2 == o.promotion_id2 && promotion_id3 == o.promotion_id3 && promotion_id4 == o.promotion_id4 && promotion_id5 == o.promotion_id5 && promotion_id6 == o.promotion_id6 && promotion_id7 == o.promotion_id7 && promotion_id8 == o.promotion_id8 && promotion_id9 == o.promotion_id9 && search_dts == o.search_dts && search_lowest_price == o.search_lowest_price && search_lowest_url == o.search_lowest_url && search_position == o.search_position && shipping_label == o.shipping_label && size == o.size && video_director == o.video_director && video_format == o.video_format && == o. && video_release_date == o.video_release_date && video_starring == o.video_starring end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1202 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 = UltracartClient.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
1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1273 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
1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1178 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) 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
1158 1159 1160 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1158 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
1164 1165 1166 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1164 def hash [adwords_grouping, adwords_label1, adwords_label2, adwords_label3, adwords_label4, adwords_label5, age_group, available_at_physical_store, , book_format, book_isbn, book_publisher, category_description, color, condition, custom_label0, custom_label1, custom_label2, custom_label3, custom_label4, gender, google_product_category, music_artist, music_format, music_release_date, omit_from_feed, product_type, promotion_id1, promotion_id10, promotion_id2, promotion_id3, promotion_id4, promotion_id5, promotion_id6, promotion_id7, promotion_id8, promotion_id9, search_dts, search_lowest_price, search_lowest_url, search_position, shipping_label, size, video_director, video_format, , video_release_date, video_starring].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 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 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 490 def list_invalid_properties invalid_properties = Array.new if !@adwords_grouping.nil? && @adwords_grouping.to_s.length > 50 invalid_properties.push('invalid value for "adwords_grouping", the character length must be smaller than or equal to 50.') end if !@adwords_label1.nil? && @adwords_label1.to_s.length > 50 invalid_properties.push('invalid value for "adwords_label1", the character length must be smaller than or equal to 50.') end if !@adwords_label2.nil? && @adwords_label2.to_s.length > 50 invalid_properties.push('invalid value for "adwords_label2", the character length must be smaller than or equal to 50.') end if !@adwords_label3.nil? && @adwords_label3.to_s.length > 50 invalid_properties.push('invalid value for "adwords_label3", the character length must be smaller than or equal to 50.') end if !@adwords_label4.nil? && @adwords_label4.to_s.length > 50 invalid_properties.push('invalid value for "adwords_label4", the character length must be smaller than or equal to 50.') end if !@adwords_label5.nil? && @adwords_label5.to_s.length > 50 invalid_properties.push('invalid value for "adwords_label5", the character length must be smaller than or equal to 50.') end if !@age_group.nil? && @age_group.to_s.length > 5 invalid_properties.push('invalid value for "age_group", the character length must be smaller than or equal to 5.') end if !@book_author.nil? && @book_author.to_s.length > 50 invalid_properties.push('invalid value for "book_author", the character length must be smaller than or equal to 50.') end if !@book_format.nil? && @book_format.to_s.length > 50 invalid_properties.push('invalid value for "book_format", the character length must be smaller than or equal to 50.') end if !@book_isbn.nil? && @book_isbn.to_s.length > 20 invalid_properties.push('invalid value for "book_isbn", the character length must be smaller than or equal to 20.') end if !@book_publisher.nil? && @book_publisher.to_s.length > 50 invalid_properties.push('invalid value for "book_publisher", the character length must be smaller than or equal to 50.') end if !@category_description.nil? && @category_description.to_s.length > 1000 invalid_properties.push('invalid value for "category_description", the character length must be smaller than or equal to 1000.') end if !@color.nil? && @color.to_s.length > 100 invalid_properties.push('invalid value for "color", the character length must be smaller than or equal to 100.') end if !@condition.nil? && @condition.to_s.length > 15 invalid_properties.push('invalid value for "condition", the character length must be smaller than or equal to 15.') end if !@custom_label0.nil? && @custom_label0.to_s.length > 50 invalid_properties.push('invalid value for "custom_label0", the character length must be smaller than or equal to 50.') end if !@custom_label1.nil? && @custom_label1.to_s.length > 50 invalid_properties.push('invalid value for "custom_label1", the character length must be smaller than or equal to 50.') end if !@custom_label2.nil? && @custom_label2.to_s.length > 50 invalid_properties.push('invalid value for "custom_label2", the character length must be smaller than or equal to 50.') end if !@custom_label3.nil? && @custom_label3.to_s.length > 50 invalid_properties.push('invalid value for "custom_label3", the character length must be smaller than or equal to 50.') end if !@custom_label4.nil? && @custom_label4.to_s.length > 50 invalid_properties.push('invalid value for "custom_label4", the character length must be smaller than or equal to 50.') end if !@gender.nil? && @gender.to_s.length > 6 invalid_properties.push('invalid value for "gender", the character length must be smaller than or equal to 6.') end if !@google_product_category.nil? && @google_product_category.to_s.length > 250 invalid_properties.push('invalid value for "google_product_category", the character length must be smaller than or equal to 250.') end if !@music_artist.nil? && @music_artist.to_s.length > 50 invalid_properties.push('invalid value for "music_artist", the character length must be smaller than or equal to 50.') end if !@music_format.nil? && @music_format.to_s.length > 5 invalid_properties.push('invalid value for "music_format", the character length must be smaller than or equal to 5.') end if !@product_type.nil? && @product_type.to_s.length > 10 invalid_properties.push('invalid value for "product_type", the character length must be smaller than or equal to 10.') end if !@promotion_id1.nil? && @promotion_id1.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id1", the character length must be smaller than or equal to 30.') end if !@promotion_id10.nil? && @promotion_id10.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id10", the character length must be smaller than or equal to 30.') end if !@promotion_id2.nil? && @promotion_id2.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id2", the character length must be smaller than or equal to 30.') end if !@promotion_id3.nil? && @promotion_id3.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id3", the character length must be smaller than or equal to 30.') end if !@promotion_id4.nil? && @promotion_id4.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id4", the character length must be smaller than or equal to 30.') end if !@promotion_id5.nil? && @promotion_id5.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id5", the character length must be smaller than or equal to 30.') end if !@promotion_id6.nil? && @promotion_id6.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id6", the character length must be smaller than or equal to 30.') end if !@promotion_id7.nil? && @promotion_id7.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id7", the character length must be smaller than or equal to 30.') end if !@promotion_id8.nil? && @promotion_id8.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id8", the character length must be smaller than or equal to 30.') end if !@promotion_id9.nil? && @promotion_id9.to_s.length > 30 invalid_properties.push('invalid value for "promotion_id9", the character length must be smaller than or equal to 30.') end if !@search_lowest_url.nil? && @search_lowest_url.to_s.length > 250 invalid_properties.push('invalid value for "search_lowest_url", the character length must be smaller than or equal to 250.') end if !@size.nil? && @size.to_s.length > 20 invalid_properties.push('invalid value for "size", the character length must be smaller than or equal to 20.') end if !@video_director.nil? && @video_director.to_s.length > 50 invalid_properties.push('invalid value for "video_director", the character length must be smaller than or equal to 50.') end if !@video_format.nil? && @video_format.to_s.length > 5 invalid_properties.push('invalid value for "video_format", the character length must be smaller than or equal to 5.') end if !@video_rating.nil? && @video_rating.to_s.length > 5 invalid_properties.push('invalid value for "video_rating", the character length must be smaller than or equal to 5.') end if !@video_starring.nil? && @video_starring.to_s.length > 150 invalid_properties.push('invalid value for "video_starring", the character length must be smaller than or equal to 150.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
1249 1250 1251 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1249 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1255 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
1243 1244 1245 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1243 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 |
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 657 def valid? return false if !@adwords_grouping.nil? && @adwords_grouping.to_s.length > 50 return false if !@adwords_label1.nil? && @adwords_label1.to_s.length > 50 return false if !@adwords_label2.nil? && @adwords_label2.to_s.length > 50 return false if !@adwords_label3.nil? && @adwords_label3.to_s.length > 50 return false if !@adwords_label4.nil? && @adwords_label4.to_s.length > 50 return false if !@adwords_label5.nil? && @adwords_label5.to_s.length > 50 return false if !@age_group.nil? && @age_group.to_s.length > 5 return false if !@book_author.nil? && @book_author.to_s.length > 50 return false if !@book_format.nil? && @book_format.to_s.length > 50 return false if !@book_isbn.nil? && @book_isbn.to_s.length > 20 return false if !@book_publisher.nil? && @book_publisher.to_s.length > 50 return false if !@category_description.nil? && @category_description.to_s.length > 1000 return false if !@color.nil? && @color.to_s.length > 100 return false if !@condition.nil? && @condition.to_s.length > 15 return false if !@custom_label0.nil? && @custom_label0.to_s.length > 50 return false if !@custom_label1.nil? && @custom_label1.to_s.length > 50 return false if !@custom_label2.nil? && @custom_label2.to_s.length > 50 return false if !@custom_label3.nil? && @custom_label3.to_s.length > 50 return false if !@custom_label4.nil? && @custom_label4.to_s.length > 50 return false if !@gender.nil? && @gender.to_s.length > 6 return false if !@google_product_category.nil? && @google_product_category.to_s.length > 250 return false if !@music_artist.nil? && @music_artist.to_s.length > 50 return false if !@music_format.nil? && @music_format.to_s.length > 5 return false if !@product_type.nil? && @product_type.to_s.length > 10 return false if !@promotion_id1.nil? && @promotion_id1.to_s.length > 30 return false if !@promotion_id10.nil? && @promotion_id10.to_s.length > 30 return false if !@promotion_id2.nil? && @promotion_id2.to_s.length > 30 return false if !@promotion_id3.nil? && @promotion_id3.to_s.length > 30 return false if !@promotion_id4.nil? && @promotion_id4.to_s.length > 30 return false if !@promotion_id5.nil? && @promotion_id5.to_s.length > 30 return false if !@promotion_id6.nil? && @promotion_id6.to_s.length > 30 return false if !@promotion_id7.nil? && @promotion_id7.to_s.length > 30 return false if !@promotion_id8.nil? && @promotion_id8.to_s.length > 30 return false if !@promotion_id9.nil? && @promotion_id9.to_s.length > 30 return false if !@search_lowest_url.nil? && @search_lowest_url.to_s.length > 250 return false if !@size.nil? && @size.to_s.length > 20 return false if !@video_director.nil? && @video_director.to_s.length > 50 return false if !@video_format.nil? && @video_format.to_s.length > 5 return false if !@video_rating.nil? && @video_rating.to_s.length > 5 return false if !@video_starring.nil? && @video_starring.to_s.length > 150 true end |