Class: UltracartClient::ItemReview

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

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ItemReview

Initializes the object

Parameters:

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

    Model attributes in the form of hash



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
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
# File 'lib/ultracart_api/models/item_review.rb', line 237

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ItemReview` 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::ItemReview`. 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?(:'customer_profile_oid')
    self.customer_profile_oid = attributes[:'customer_profile_oid']
  end

  if attributes.key?(:'featured')
    self.featured = attributes[:'featured']
  end

  if attributes.key?(:'helperful_no_votes')
    self.helperful_no_votes = attributes[:'helperful_no_votes']
  end

  if attributes.key?(:'helpful_yes_votes')
    self.helpful_yes_votes = attributes[:'helpful_yes_votes']
  end

  if attributes.key?(:'merchant_reply')
    self.merchant_reply = attributes[:'merchant_reply']
  end

  if attributes.key?(:'order_id')
    self.order_id = attributes[:'order_id']
  end

  if attributes.key?(:'overall')
    self.overall = attributes[:'overall']
  end

  if attributes.key?(:'rating_name1')
    self.rating_name1 = attributes[:'rating_name1']
  end

  if attributes.key?(:'rating_name10')
    self.rating_name10 = attributes[:'rating_name10']
  end

  if attributes.key?(:'rating_name2')
    self.rating_name2 = attributes[:'rating_name2']
  end

  if attributes.key?(:'rating_name3')
    self.rating_name3 = attributes[:'rating_name3']
  end

  if attributes.key?(:'rating_name4')
    self.rating_name4 = attributes[:'rating_name4']
  end

  if attributes.key?(:'rating_name5')
    self.rating_name5 = attributes[:'rating_name5']
  end

  if attributes.key?(:'rating_name6')
    self.rating_name6 = attributes[:'rating_name6']
  end

  if attributes.key?(:'rating_name7')
    self.rating_name7 = attributes[:'rating_name7']
  end

  if attributes.key?(:'rating_name8')
    self.rating_name8 = attributes[:'rating_name8']
  end

  if attributes.key?(:'rating_name9')
    self.rating_name9 = attributes[:'rating_name9']
  end

  if attributes.key?(:'rating_score1')
    self.rating_score1 = attributes[:'rating_score1']
  end

  if attributes.key?(:'rating_score10')
    self.rating_score10 = attributes[:'rating_score10']
  end

  if attributes.key?(:'rating_score2')
    self.rating_score2 = attributes[:'rating_score2']
  end

  if attributes.key?(:'rating_score3')
    self.rating_score3 = attributes[:'rating_score3']
  end

  if attributes.key?(:'rating_score4')
    self.rating_score4 = attributes[:'rating_score4']
  end

  if attributes.key?(:'rating_score5')
    self.rating_score5 = attributes[:'rating_score5']
  end

  if attributes.key?(:'rating_score6')
    self.rating_score6 = attributes[:'rating_score6']
  end

  if attributes.key?(:'rating_score7')
    self.rating_score7 = attributes[:'rating_score7']
  end

  if attributes.key?(:'rating_score8')
    self.rating_score8 = attributes[:'rating_score8']
  end

  if attributes.key?(:'rating_score9')
    self.rating_score9 = attributes[:'rating_score9']
  end

  if attributes.key?(:'recommend_store_to_friend')
    self.recommend_store_to_friend = attributes[:'recommend_store_to_friend']
  end

  if attributes.key?(:'recommend_to_friend')
    self.recommend_to_friend = attributes[:'recommend_to_friend']
  end

  if attributes.key?(:'review')
    self.review = attributes[:'review']
  end

  if attributes.key?(:'review_oid')
    self.review_oid = attributes[:'review_oid']
  end

  if attributes.key?(:'reviewed_nickname')
    self.reviewed_nickname = attributes[:'reviewed_nickname']
  end

  if attributes.key?(:'reviewer_email')
    self.reviewer_email = attributes[:'reviewer_email']
  end

  if attributes.key?(:'reviewer_location')
    self.reviewer_location = attributes[:'reviewer_location']
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.key?(:'store_feedback')
    self.store_feedback = attributes[:'store_feedback']
  end

  if attributes.key?(:'submitted_dts')
    self. = attributes[:'submitted_dts']
  end

  if attributes.key?(:'title')
    self.title = attributes[:'title']
  end
end

Instance Attribute Details

#customer_profile_oidObject

Customer profile object identifier



19
20
21
# File 'lib/ultracart_api/models/item_review.rb', line 19

def customer_profile_oid
  @customer_profile_oid
end

Returns the value of attribute featured.



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

def featured
  @featured
end

#helperful_no_votesObject

Returns the value of attribute helperful_no_votes.



23
24
25
# File 'lib/ultracart_api/models/item_review.rb', line 23

def helperful_no_votes
  @helperful_no_votes
end

#helpful_yes_votesObject

Returns the value of attribute helpful_yes_votes.



25
26
27
# File 'lib/ultracart_api/models/item_review.rb', line 25

def helpful_yes_votes
  @helpful_yes_votes
end

#merchant_replyObject

Merchant Reply (set to an empty string to remove)



28
29
30
# File 'lib/ultracart_api/models/item_review.rb', line 28

def merchant_reply
  @merchant_reply
end

#order_idObject

Returns the value of attribute order_id.



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

def order_id
  @order_id
end

#overallObject

Returns the value of attribute overall.



32
33
34
# File 'lib/ultracart_api/models/item_review.rb', line 32

def overall
  @overall
end

#rating_name1Object

Rating Name 1



35
36
37
# File 'lib/ultracart_api/models/item_review.rb', line 35

def rating_name1
  @rating_name1
end

#rating_name10Object

Rating Name 10



38
39
40
# File 'lib/ultracart_api/models/item_review.rb', line 38

def rating_name10
  @rating_name10
end

#rating_name2Object

Rating Name 2



41
42
43
# File 'lib/ultracart_api/models/item_review.rb', line 41

def rating_name2
  @rating_name2
end

#rating_name3Object

Rating Name 3



44
45
46
# File 'lib/ultracart_api/models/item_review.rb', line 44

def rating_name3
  @rating_name3
end

#rating_name4Object

Rating Name 4



47
48
49
# File 'lib/ultracart_api/models/item_review.rb', line 47

def rating_name4
  @rating_name4
end

#rating_name5Object

Rating Name 5



50
51
52
# File 'lib/ultracart_api/models/item_review.rb', line 50

def rating_name5
  @rating_name5
end

#rating_name6Object

Rating Name 6



53
54
55
# File 'lib/ultracart_api/models/item_review.rb', line 53

def rating_name6
  @rating_name6
end

#rating_name7Object

Rating Name 7



56
57
58
# File 'lib/ultracart_api/models/item_review.rb', line 56

def rating_name7
  @rating_name7
end

#rating_name8Object

Rating Name 8



59
60
61
# File 'lib/ultracart_api/models/item_review.rb', line 59

def rating_name8
  @rating_name8
end

#rating_name9Object

Rating Name 9



62
63
64
# File 'lib/ultracart_api/models/item_review.rb', line 62

def rating_name9
  @rating_name9
end

#rating_score1Object

Returns the value of attribute rating_score1.



64
65
66
# File 'lib/ultracart_api/models/item_review.rb', line 64

def rating_score1
  @rating_score1
end

#rating_score10Object

Returns the value of attribute rating_score10.



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

def rating_score10
  @rating_score10
end

#rating_score2Object

Returns the value of attribute rating_score2.



68
69
70
# File 'lib/ultracart_api/models/item_review.rb', line 68

def rating_score2
  @rating_score2
end

#rating_score3Object

Returns the value of attribute rating_score3.



70
71
72
# File 'lib/ultracart_api/models/item_review.rb', line 70

def rating_score3
  @rating_score3
end

#rating_score4Object

Returns the value of attribute rating_score4.



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

def rating_score4
  @rating_score4
end

#rating_score5Object

Returns the value of attribute rating_score5.



74
75
76
# File 'lib/ultracart_api/models/item_review.rb', line 74

def rating_score5
  @rating_score5
end

#rating_score6Object

Returns the value of attribute rating_score6.



76
77
78
# File 'lib/ultracart_api/models/item_review.rb', line 76

def rating_score6
  @rating_score6
end

#rating_score7Object

Returns the value of attribute rating_score7.



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

def rating_score7
  @rating_score7
end

#rating_score8Object

Returns the value of attribute rating_score8.



80
81
82
# File 'lib/ultracart_api/models/item_review.rb', line 80

def rating_score8
  @rating_score8
end

#rating_score9Object

Returns the value of attribute rating_score9.



82
83
84
# File 'lib/ultracart_api/models/item_review.rb', line 82

def rating_score9
  @rating_score9
end

#recommend_store_to_friendObject

Returns the value of attribute recommend_store_to_friend.



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

def recommend_store_to_friend
  @recommend_store_to_friend
end

#recommend_to_friendObject

Returns the value of attribute recommend_to_friend.



86
87
88
# File 'lib/ultracart_api/models/item_review.rb', line 86

def recommend_to_friend
  @recommend_to_friend
end

#reviewObject

Review



89
90
91
# File 'lib/ultracart_api/models/item_review.rb', line 89

def review
  @review
end

#review_oidObject

Returns the value of attribute review_oid.



91
92
93
# File 'lib/ultracart_api/models/item_review.rb', line 91

def review_oid
  @review_oid
end

#reviewed_nicknameObject

Nickname



94
95
96
# File 'lib/ultracart_api/models/item_review.rb', line 94

def reviewed_nickname
  @reviewed_nickname
end

#reviewer_emailObject

Reviewer Email



97
98
99
# File 'lib/ultracart_api/models/item_review.rb', line 97

def reviewer_email
  @reviewer_email
end

#reviewer_locationObject

Location



100
101
102
# File 'lib/ultracart_api/models/item_review.rb', line 100

def reviewer_location
  @reviewer_location
end

#statusObject

Status of the review



103
104
105
# File 'lib/ultracart_api/models/item_review.rb', line 103

def status
  @status
end

#store_feedbackObject

Store Feedback



106
107
108
# File 'lib/ultracart_api/models/item_review.rb', line 106

def store_feedback
  @store_feedback
end

#submitted_dtsObject

Date/time of review submission



109
110
111
# File 'lib/ultracart_api/models/item_review.rb', line 109

def 
  @submitted_dts
end

#titleObject

Title



112
113
114
# File 'lib/ultracart_api/models/item_review.rb', line 112

def title
  @title
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



181
182
183
# File 'lib/ultracart_api/models/item_review.rb', line 181

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/ultracart_api/models/item_review.rb', line 137

def self.attribute_map
  {
    :'customer_profile_oid' => :'customer_profile_oid',
    :'featured' => :'featured',
    :'helperful_no_votes' => :'helperful_no_votes',
    :'helpful_yes_votes' => :'helpful_yes_votes',
    :'merchant_reply' => :'merchant_reply',
    :'order_id' => :'order_id',
    :'overall' => :'overall',
    :'rating_name1' => :'rating_name1',
    :'rating_name10' => :'rating_name10',
    :'rating_name2' => :'rating_name2',
    :'rating_name3' => :'rating_name3',
    :'rating_name4' => :'rating_name4',
    :'rating_name5' => :'rating_name5',
    :'rating_name6' => :'rating_name6',
    :'rating_name7' => :'rating_name7',
    :'rating_name8' => :'rating_name8',
    :'rating_name9' => :'rating_name9',
    :'rating_score1' => :'rating_score1',
    :'rating_score10' => :'rating_score10',
    :'rating_score2' => :'rating_score2',
    :'rating_score3' => :'rating_score3',
    :'rating_score4' => :'rating_score4',
    :'rating_score5' => :'rating_score5',
    :'rating_score6' => :'rating_score6',
    :'rating_score7' => :'rating_score7',
    :'rating_score8' => :'rating_score8',
    :'rating_score9' => :'rating_score9',
    :'recommend_store_to_friend' => :'recommend_store_to_friend',
    :'recommend_to_friend' => :'recommend_to_friend',
    :'review' => :'review',
    :'review_oid' => :'review_oid',
    :'reviewed_nickname' => :'reviewed_nickname',
    :'reviewer_email' => :'reviewer_email',
    :'reviewer_location' => :'reviewer_location',
    :'status' => :'status',
    :'store_feedback' => :'store_feedback',
    :'submitted_dts' => :'submitted_dts',
    :'title' => :'title'
  }
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



743
744
745
# File 'lib/ultracart_api/models/item_review.rb', line 743

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



230
231
232
233
# File 'lib/ultracart_api/models/item_review.rb', line 230

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



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

def self.openapi_types
  {
    :'customer_profile_oid' => :'Integer',
    :'featured' => :'Boolean',
    :'helperful_no_votes' => :'Integer',
    :'helpful_yes_votes' => :'Integer',
    :'merchant_reply' => :'String',
    :'order_id' => :'String',
    :'overall' => :'Float',
    :'rating_name1' => :'String',
    :'rating_name10' => :'String',
    :'rating_name2' => :'String',
    :'rating_name3' => :'String',
    :'rating_name4' => :'String',
    :'rating_name5' => :'String',
    :'rating_name6' => :'String',
    :'rating_name7' => :'String',
    :'rating_name8' => :'String',
    :'rating_name9' => :'String',
    :'rating_score1' => :'Float',
    :'rating_score10' => :'Float',
    :'rating_score2' => :'Float',
    :'rating_score3' => :'Float',
    :'rating_score4' => :'Float',
    :'rating_score5' => :'Float',
    :'rating_score6' => :'Float',
    :'rating_score7' => :'Float',
    :'rating_score8' => :'Float',
    :'rating_score9' => :'Float',
    :'recommend_store_to_friend' => :'Integer',
    :'recommend_to_friend' => :'Boolean',
    :'review' => :'String',
    :'review_oid' => :'Integer',
    :'reviewed_nickname' => :'String',
    :'reviewer_email' => :'String',
    :'reviewer_location' => :'String',
    :'status' => :'String',
    :'store_feedback' => :'String',
    :'submitted_dts' => :'String',
    :'title' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
# File 'lib/ultracart_api/models/item_review.rb', line 685

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      customer_profile_oid == o.customer_profile_oid &&
      featured == o.featured &&
      helperful_no_votes == o.helperful_no_votes &&
      helpful_yes_votes == o.helpful_yes_votes &&
      merchant_reply == o.merchant_reply &&
      order_id == o.order_id &&
      overall == o.overall &&
      rating_name1 == o.rating_name1 &&
      rating_name10 == o.rating_name10 &&
      rating_name2 == o.rating_name2 &&
      rating_name3 == o.rating_name3 &&
      rating_name4 == o.rating_name4 &&
      rating_name5 == o.rating_name5 &&
      rating_name6 == o.rating_name6 &&
      rating_name7 == o.rating_name7 &&
      rating_name8 == o.rating_name8 &&
      rating_name9 == o.rating_name9 &&
      rating_score1 == o.rating_score1 &&
      rating_score10 == o.rating_score10 &&
      rating_score2 == o.rating_score2 &&
      rating_score3 == o.rating_score3 &&
      rating_score4 == o.rating_score4 &&
      rating_score5 == o.rating_score5 &&
      rating_score6 == o.rating_score6 &&
      rating_score7 == o.rating_score7 &&
      rating_score8 == o.rating_score8 &&
      rating_score9 == o.rating_score9 &&
      recommend_store_to_friend == o.recommend_store_to_friend &&
      recommend_to_friend == o.recommend_to_friend &&
      review == o.review &&
      review_oid == o.review_oid &&
      reviewed_nickname == o.reviewed_nickname &&
      reviewer_email == o.reviewer_email &&
      reviewer_location == o.reviewer_location &&
      status == o.status &&
      store_feedback == o.store_feedback &&
       == o. &&
      title == o.title
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



774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'lib/ultracart_api/models/item_review.rb', line 774

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



845
846
847
848
849
850
851
852
853
854
855
856
857
# File 'lib/ultracart_api/models/item_review.rb', line 845

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



750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
# File 'lib/ultracart_api/models/item_review.rb', line 750

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


730
731
732
# File 'lib/ultracart_api/models/item_review.rb', line 730

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



736
737
738
# File 'lib/ultracart_api/models/item_review.rb', line 736

def hash
  [customer_profile_oid, featured, helperful_no_votes, helpful_yes_votes, merchant_reply, order_id, overall, rating_name1, rating_name10, rating_name2, rating_name3, rating_name4, rating_name5, rating_name6, rating_name7, rating_name8, rating_name9, rating_score1, rating_score10, rating_score2, rating_score3, rating_score4, rating_score5, rating_score6, rating_score7, rating_score8, rating_score9, recommend_store_to_friend, recommend_to_friend, review, review_oid, reviewed_nickname, reviewer_email, reviewer_location, status, store_feedback, , title].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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

def list_invalid_properties
  invalid_properties = Array.new
  if !@merchant_reply.nil? && @merchant_reply.to_s.length > 10000
    invalid_properties.push('invalid value for "merchant_reply", the character length must be smaller than or equal to 10000.')
  end

  if !@rating_name1.nil? && @rating_name1.to_s.length > 100
    invalid_properties.push('invalid value for "rating_name1", the character length must be smaller than or equal to 100.')
  end

  if !@rating_name10.nil? && @rating_name10.to_s.length > 100
    invalid_properties.push('invalid value for "rating_name10", the character length must be smaller than or equal to 100.')
  end

  if !@rating_name2.nil? && @rating_name2.to_s.length > 100
    invalid_properties.push('invalid value for "rating_name2", the character length must be smaller than or equal to 100.')
  end

  if !@rating_name3.nil? && @rating_name3.to_s.length > 100
    invalid_properties.push('invalid value for "rating_name3", the character length must be smaller than or equal to 100.')
  end

  if !@rating_name4.nil? && @rating_name4.to_s.length > 100
    invalid_properties.push('invalid value for "rating_name4", the character length must be smaller than or equal to 100.')
  end

  if !@rating_name5.nil? && @rating_name5.to_s.length > 100
    invalid_properties.push('invalid value for "rating_name5", the character length must be smaller than or equal to 100.')
  end

  if !@rating_name6.nil? && @rating_name6.to_s.length > 100
    invalid_properties.push('invalid value for "rating_name6", the character length must be smaller than or equal to 100.')
  end

  if !@rating_name7.nil? && @rating_name7.to_s.length > 100
    invalid_properties.push('invalid value for "rating_name7", the character length must be smaller than or equal to 100.')
  end

  if !@rating_name8.nil? && @rating_name8.to_s.length > 100
    invalid_properties.push('invalid value for "rating_name8", the character length must be smaller than or equal to 100.')
  end

  if !@rating_name9.nil? && @rating_name9.to_s.length > 100
    invalid_properties.push('invalid value for "rating_name9", the character length must be smaller than or equal to 100.')
  end

  if !@review.nil? && @review.to_s.length > 10000
    invalid_properties.push('invalid value for "review", the character length must be smaller than or equal to 10000.')
  end

  if !@reviewed_nickname.nil? && @reviewed_nickname.to_s.length > 25
    invalid_properties.push('invalid value for "reviewed_nickname", the character length must be smaller than or equal to 25.')
  end

  if !@reviewer_email.nil? && @reviewer_email.to_s.length > 100
    invalid_properties.push('invalid value for "reviewer_email", the character length must be smaller than or equal to 100.')
  end

  if !@reviewer_location.nil? && @reviewer_location.to_s.length > 25
    invalid_properties.push('invalid value for "reviewer_location", the character length must be smaller than or equal to 25.')
  end

  if !@store_feedback.nil? && @store_feedback.to_s.length > 10000
    invalid_properties.push('invalid value for "store_feedback", the character length must be smaller than or equal to 10000.')
  end

  if !@title.nil? && @title.to_s.length > 250
    invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 250.')
  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



821
822
823
# File 'lib/ultracart_api/models/item_review.rb', line 821

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



827
828
829
830
831
832
833
834
835
836
837
838
839
# File 'lib/ultracart_api/models/item_review.rb', line 827

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



815
816
817
# File 'lib/ultracart_api/models/item_review.rb', line 815

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



480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/ultracart_api/models/item_review.rb', line 480

def valid?
  return false if !@merchant_reply.nil? && @merchant_reply.to_s.length > 10000
  return false if !@rating_name1.nil? && @rating_name1.to_s.length > 100
  return false if !@rating_name10.nil? && @rating_name10.to_s.length > 100
  return false if !@rating_name2.nil? && @rating_name2.to_s.length > 100
  return false if !@rating_name3.nil? && @rating_name3.to_s.length > 100
  return false if !@rating_name4.nil? && @rating_name4.to_s.length > 100
  return false if !@rating_name5.nil? && @rating_name5.to_s.length > 100
  return false if !@rating_name6.nil? && @rating_name6.to_s.length > 100
  return false if !@rating_name7.nil? && @rating_name7.to_s.length > 100
  return false if !@rating_name8.nil? && @rating_name8.to_s.length > 100
  return false if !@rating_name9.nil? && @rating_name9.to_s.length > 100
  return false if !@review.nil? && @review.to_s.length > 10000
  return false if !@reviewed_nickname.nil? && @reviewed_nickname.to_s.length > 25
  return false if !@reviewer_email.nil? && @reviewer_email.to_s.length > 100
  return false if !@reviewer_location.nil? && @reviewer_location.to_s.length > 25
  status_validator = EnumAttributeValidator.new('String', ["approved", "unapproved", "rejected", "multimedia processing"])
  return false unless status_validator.valid?(@status)
  return false if !@store_feedback.nil? && @store_feedback.to_s.length > 10000
  return false if !@title.nil? && @title.to_s.length > 250
  true
end