Class: UltracartClient::ItemGoogleProductSearch

Inherits:
Object
  • Object
show all
Defined in:
lib/ultracart_api/models/item_google_product_search.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ItemGoogleProductSearch

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
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
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 270

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'adwords_grouping')
    self.adwords_grouping = attributes[:'adwords_grouping']
  end

  if attributes.has_key?(:'adwords_label1')
    self.adwords_label1 = attributes[:'adwords_label1']
  end

  if attributes.has_key?(:'adwords_label2')
    self.adwords_label2 = attributes[:'adwords_label2']
  end

  if attributes.has_key?(:'adwords_label3')
    self.adwords_label3 = attributes[:'adwords_label3']
  end

  if attributes.has_key?(:'adwords_label4')
    self.adwords_label4 = attributes[:'adwords_label4']
  end

  if attributes.has_key?(:'adwords_label5')
    self.adwords_label5 = attributes[:'adwords_label5']
  end

  if attributes.has_key?(:'age_group')
    self.age_group = attributes[:'age_group']
  end

  if attributes.has_key?(:'available_at_physical_store')
    self.available_at_physical_store = attributes[:'available_at_physical_store']
  end

  if attributes.has_key?(:'book_author')
    self.book_author = attributes[:'book_author']
  end

  if attributes.has_key?(:'book_format')
    self.book_format = attributes[:'book_format']
  end

  if attributes.has_key?(:'book_isbn')
    self.book_isbn = attributes[:'book_isbn']
  end

  if attributes.has_key?(:'book_publisher')
    self.book_publisher = attributes[:'book_publisher']
  end

  if attributes.has_key?(:'category_description')
    self.category_description = attributes[:'category_description']
  end

  if attributes.has_key?(:'color')
    self.color = attributes[:'color']
  end

  if attributes.has_key?(:'condition')
    self.condition = attributes[:'condition']
  end

  if attributes.has_key?(:'custom_label0')
    self.custom_label0 = attributes[:'custom_label0']
  end

  if attributes.has_key?(:'custom_label1')
    self.custom_label1 = attributes[:'custom_label1']
  end

  if attributes.has_key?(:'custom_label2')
    self.custom_label2 = attributes[:'custom_label2']
  end

  if attributes.has_key?(:'custom_label3')
    self.custom_label3 = attributes[:'custom_label3']
  end

  if attributes.has_key?(:'custom_label4')
    self.custom_label4 = attributes[:'custom_label4']
  end

  if attributes.has_key?(:'gender')
    self.gender = attributes[:'gender']
  end

  if attributes.has_key?(:'google_product_category')
    self.google_product_category = attributes[:'google_product_category']
  end

  if attributes.has_key?(:'music_artist')
    self.music_artist = attributes[:'music_artist']
  end

  if attributes.has_key?(:'music_format')
    self.music_format = attributes[:'music_format']
  end

  if attributes.has_key?(:'music_release_date')
    self.music_release_date = attributes[:'music_release_date']
  end

  if attributes.has_key?(:'omit_from_feed')
    self.omit_from_feed = attributes[:'omit_from_feed']
  end

  if attributes.has_key?(:'product_type')
    self.product_type = attributes[:'product_type']
  end

  if attributes.has_key?(:'promotion_id1')
    self.promotion_id1 = attributes[:'promotion_id1']
  end

  if attributes.has_key?(:'promotion_id10')
    self.promotion_id10 = attributes[:'promotion_id10']
  end

  if attributes.has_key?(:'promotion_id2')
    self.promotion_id2 = attributes[:'promotion_id2']
  end

  if attributes.has_key?(:'promotion_id3')
    self.promotion_id3 = attributes[:'promotion_id3']
  end

  if attributes.has_key?(:'promotion_id4')
    self.promotion_id4 = attributes[:'promotion_id4']
  end

  if attributes.has_key?(:'promotion_id5')
    self.promotion_id5 = attributes[:'promotion_id5']
  end

  if attributes.has_key?(:'promotion_id6')
    self.promotion_id6 = attributes[:'promotion_id6']
  end

  if attributes.has_key?(:'promotion_id7')
    self.promotion_id7 = attributes[:'promotion_id7']
  end

  if attributes.has_key?(:'promotion_id8')
    self.promotion_id8 = attributes[:'promotion_id8']
  end

  if attributes.has_key?(:'promotion_id9')
    self.promotion_id9 = attributes[:'promotion_id9']
  end

  if attributes.has_key?(:'search_dts')
    self.search_dts = attributes[:'search_dts']
  end

  if attributes.has_key?(:'search_lowest_price')
    self.search_lowest_price = attributes[:'search_lowest_price']
  end

  if attributes.has_key?(:'search_lowest_url')
    self.search_lowest_url = attributes[:'search_lowest_url']
  end

  if attributes.has_key?(:'search_position')
    self.search_position = attributes[:'search_position']
  end

  if attributes.has_key?(:'shippingLabel')
    self.shipping_label = attributes[:'shippingLabel']
  end

  if attributes.has_key?(:'size')
    self.size = attributes[:'size']
  end

  if attributes.has_key?(:'video_director')
    self.video_director = attributes[:'video_director']
  end

  if attributes.has_key?(:'video_format')
    self.video_format = attributes[:'video_format']
  end

  if attributes.has_key?(:'video_rating')
    self.video_rating = attributes[:'video_rating']
  end

  if attributes.has_key?(:'video_release_date')
    self.video_release_date = attributes[:'video_release_date']
  end

  if attributes.has_key?(:'video_starring')
    self.video_starring = attributes[:'video_starring']
  end
end

Instance Attribute Details

#adwords_groupingObject

Adwords grouping



18
19
20
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 18

def adwords_grouping
  @adwords_grouping
end

#adwords_label1Object

Adwords label 1



21
22
23
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 21

def adwords_label1
  @adwords_label1
end

#adwords_label2Object

Adwords label 2



24
25
26
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 24

def adwords_label2
  @adwords_label2
end

#adwords_label3Object

Adwords label 3



27
28
29
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 27

def adwords_label3
  @adwords_label3
end

#adwords_label4Object

Adwords label 4



30
31
32
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 30

def adwords_label4
  @adwords_label4
end

#adwords_label5Object

Adwords label 5



33
34
35
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 33

def adwords_label5
  @adwords_label5
end

#age_groupObject

Age group



36
37
38
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 36

def age_group
  @age_group
end

#available_at_physical_storeObject

Available at physical store



39
40
41
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 39

def available_at_physical_store
  @available_at_physical_store
end

#book_authorObject

Book - author



42
43
44
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 42

def book_author
  @book_author
end

#book_formatObject

Book - format



45
46
47
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 45

def book_format
  @book_format
end

#book_isbnObject

Bood - ISBN



48
49
50
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 48

def book_isbn
  @book_isbn
end

#book_publisherObject

Book - publisher



51
52
53
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 51

def book_publisher
  @book_publisher
end

#category_descriptionObject

Category description



54
55
56
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 54

def category_description
  @category_description
end

#colorObject

Color



57
58
59
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 57

def color
  @color
end

#conditionObject

Condition



60
61
62
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 60

def condition
  @condition
end

#custom_label0Object

Custom label 0



63
64
65
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 63

def custom_label0
  @custom_label0
end

#custom_label1Object

Custom label 1



66
67
68
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 66

def custom_label1
  @custom_label1
end

#custom_label2Object

Custom label 2



69
70
71
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 69

def custom_label2
  @custom_label2
end

#custom_label3Object

Custom label 3



72
73
74
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 72

def custom_label3
  @custom_label3
end

#custom_label4Object

Custom label 4



75
76
77
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 75

def custom_label4
  @custom_label4
end

#genderObject

Gender



78
79
80
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 78

def gender
  @gender
end

#google_product_categoryObject

Google product category



81
82
83
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 81

def google_product_category
  @google_product_category
end

#music_artistObject

Music - artist



84
85
86
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 84

def music_artist
  @music_artist
end

#music_formatObject

Music - format



87
88
89
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 87

def music_format
  @music_format
end

#music_release_dateObject

Music - release date



90
91
92
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 90

def music_release_date
  @music_release_date
end

#omit_from_feedObject

Omit from feed



93
94
95
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 93

def omit_from_feed
  @omit_from_feed
end

#product_typeObject

Product type



96
97
98
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 96

def product_type
  @product_type
end

#promotion_id1Object

Promotion ID 1



99
100
101
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 99

def promotion_id1
  @promotion_id1
end

#promotion_id10Object

Promotion ID 10



102
103
104
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 102

def promotion_id10
  @promotion_id10
end

#promotion_id2Object

Promotion ID 2



105
106
107
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 105

def promotion_id2
  @promotion_id2
end

#promotion_id3Object

Promotion ID 3



108
109
110
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 108

def promotion_id3
  @promotion_id3
end

#promotion_id4Object

Promotion ID 4



111
112
113
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 111

def promotion_id4
  @promotion_id4
end

#promotion_id5Object

Promotion ID 5



114
115
116
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 114

def promotion_id5
  @promotion_id5
end

#promotion_id6Object

Promotion ID 6



117
118
119
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 117

def promotion_id6
  @promotion_id6
end

#promotion_id7Object

Promotion ID 7



120
121
122
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 120

def promotion_id7
  @promotion_id7
end

#promotion_id8Object

Promotion ID 8



123
124
125
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 123

def promotion_id8
  @promotion_id8
end

#promotion_id9Object

Promotion ID 9



126
127
128
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 126

def promotion_id9
  @promotion_id9
end

#search_dtsObject

Search date/time



129
130
131
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 129

def search_dts
  @search_dts
end

#search_lowest_priceObject

Search lowest price



132
133
134
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 132

def search_lowest_price
  @search_lowest_price
end

#search_lowest_urlObject

Search lowest URL



135
136
137
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 135

def search_lowest_url
  @search_lowest_url
end

#search_positionObject

Search position



138
139
140
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 138

def search_position
  @search_position
end

#shipping_labelObject

Returns the value of attribute shipping_label.



140
141
142
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 140

def shipping_label
  @shipping_label
end

#sizeObject

Size



143
144
145
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 143

def size
  @size
end

#video_directorObject

Video - director



146
147
148
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 146

def video_director
  @video_director
end

#video_formatObject

Video - format



149
150
151
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 149

def video_format
  @video_format
end

#video_ratingObject

Video - rating



152
153
154
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 152

def video_rating
  @video_rating
end

#video_release_dateObject

Video - release date



155
156
157
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 155

def video_release_date
  @video_release_date
end

#video_starringObject

Video - starring



158
159
160
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 158

def video_starring
  @video_starring
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 161

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

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 215

def self.swagger_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.

Parameters:

  • Object (Object)

    to be compared



1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
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
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1084

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 &&
      book_author == o.book_author &&
      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 &&
      video_rating == o.video_rating &&
      video_release_date == o.video_release_date &&
      video_starring == o.video_starring
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1173

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.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
    temp_model = UltracartClient.const_get(type).new
    temp_model.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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1239

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1152

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if 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 # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


1139
1140
1141
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1139

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



1145
1146
1147
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1145

def hash
  [adwords_grouping, adwords_label1, adwords_label2, adwords_label3, adwords_label4, adwords_label5, age_group, available_at_physical_store, book_author, 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_rating, video_release_date, video_starring].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
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
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 471

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 > 20
    invalid_properties.push('invalid value for "color", the character length must be smaller than or equal to 20.')
  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_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



1219
1220
1221
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1219

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



1225
1226
1227
1228
1229
1230
1231
1232
1233
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1225

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



1213
1214
1215
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 1213

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
# File 'lib/ultracart_api/models/item_google_product_search.rb', line 638

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 > 20
  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