Class: UltracartClient::ItemReview
- Inherits:
-
Object
- Object
- UltracartClient::ItemReview
- Defined in:
- lib/ultracart_api/models/item_review.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#customer_profile_oid ⇒ Object
Customer profile object identifier.
-
#featured ⇒ Object
Returns the value of attribute featured.
-
#helperful_no_votes ⇒ Object
Returns the value of attribute helperful_no_votes.
-
#helpful_yes_votes ⇒ Object
Returns the value of attribute helpful_yes_votes.
-
#order_id ⇒ Object
Returns the value of attribute order_id.
-
#overall ⇒ Object
Returns the value of attribute overall.
-
#rating_name1 ⇒ Object
Rating Name 1.
-
#rating_name10 ⇒ Object
Rating Name 10.
-
#rating_name2 ⇒ Object
Rating Name 2.
-
#rating_name3 ⇒ Object
Rating Name 3.
-
#rating_name4 ⇒ Object
Rating Name 4.
-
#rating_name5 ⇒ Object
Rating Name 5.
-
#rating_name6 ⇒ Object
Rating Name 6.
-
#rating_name7 ⇒ Object
Rating Name 7.
-
#rating_name8 ⇒ Object
Rating Name 8.
-
#rating_name9 ⇒ Object
Rating Name 9.
-
#rating_score1 ⇒ Object
Returns the value of attribute rating_score1.
-
#rating_score10 ⇒ Object
Returns the value of attribute rating_score10.
-
#rating_score2 ⇒ Object
Returns the value of attribute rating_score2.
-
#rating_score3 ⇒ Object
Returns the value of attribute rating_score3.
-
#rating_score4 ⇒ Object
Returns the value of attribute rating_score4.
-
#rating_score5 ⇒ Object
Returns the value of attribute rating_score5.
-
#rating_score6 ⇒ Object
Returns the value of attribute rating_score6.
-
#rating_score7 ⇒ Object
Returns the value of attribute rating_score7.
-
#rating_score8 ⇒ Object
Returns the value of attribute rating_score8.
-
#rating_score9 ⇒ Object
Returns the value of attribute rating_score9.
-
#recommend_store_to_friend ⇒ Object
Returns the value of attribute recommend_store_to_friend.
-
#recommend_to_friend ⇒ Object
Returns the value of attribute recommend_to_friend.
-
#review ⇒ Object
Review.
-
#review_oid ⇒ Object
Returns the value of attribute review_oid.
-
#reviewed_nickname ⇒ Object
Nickname.
-
#reviewer_email ⇒ Object
Reviewer Email.
-
#reviewer_location ⇒ Object
Location.
-
#status ⇒ Object
Status of the review.
-
#store_feedback ⇒ Object
Store Feedback.
-
#submitted_dts ⇒ Object
Date/time of review submission.
-
#title ⇒ Object
Title.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_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 ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ItemReview
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 = {}) ⇒ ItemReview
Initializes the object
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 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 |
# File 'lib/ultracart_api/models/item_review.rb', line 220 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?(:'customer_profile_oid') self.customer_profile_oid = attributes[:'customer_profile_oid'] end if attributes.has_key?(:'featured') self.featured = attributes[:'featured'] end if attributes.has_key?(:'helperful_no_votes') self.helperful_no_votes = attributes[:'helperful_no_votes'] end if attributes.has_key?(:'helpful_yes_votes') self.helpful_yes_votes = attributes[:'helpful_yes_votes'] end if attributes.has_key?(:'order_id') self.order_id = attributes[:'order_id'] end if attributes.has_key?(:'overall') self.overall = attributes[:'overall'] end if attributes.has_key?(:'rating_name1') self. = attributes[:'rating_name1'] end if attributes.has_key?(:'rating_name10') self. = attributes[:'rating_name10'] end if attributes.has_key?(:'rating_name2') self. = attributes[:'rating_name2'] end if attributes.has_key?(:'rating_name3') self. = attributes[:'rating_name3'] end if attributes.has_key?(:'rating_name4') self. = attributes[:'rating_name4'] end if attributes.has_key?(:'rating_name5') self. = attributes[:'rating_name5'] end if attributes.has_key?(:'rating_name6') self. = attributes[:'rating_name6'] end if attributes.has_key?(:'rating_name7') self. = attributes[:'rating_name7'] end if attributes.has_key?(:'rating_name8') self. = attributes[:'rating_name8'] end if attributes.has_key?(:'rating_name9') self. = attributes[:'rating_name9'] end if attributes.has_key?(:'rating_score1') self. = attributes[:'rating_score1'] end if attributes.has_key?(:'rating_score10') self. = attributes[:'rating_score10'] end if attributes.has_key?(:'rating_score2') self. = attributes[:'rating_score2'] end if attributes.has_key?(:'rating_score3') self. = attributes[:'rating_score3'] end if attributes.has_key?(:'rating_score4') self. = attributes[:'rating_score4'] end if attributes.has_key?(:'rating_score5') self. = attributes[:'rating_score5'] end if attributes.has_key?(:'rating_score6') self. = attributes[:'rating_score6'] end if attributes.has_key?(:'rating_score7') self. = attributes[:'rating_score7'] end if attributes.has_key?(:'rating_score8') self. = attributes[:'rating_score8'] end if attributes.has_key?(:'rating_score9') self. = attributes[:'rating_score9'] end if attributes.has_key?(:'recommend_store_to_friend') self.recommend_store_to_friend = attributes[:'recommend_store_to_friend'] end if attributes.has_key?(:'recommend_to_friend') self.recommend_to_friend = attributes[:'recommend_to_friend'] end if attributes.has_key?(:'review') self.review = attributes[:'review'] end if attributes.has_key?(:'review_oid') self.review_oid = attributes[:'review_oid'] end if attributes.has_key?(:'reviewed_nickname') self.reviewed_nickname = attributes[:'reviewed_nickname'] end if attributes.has_key?(:'reviewer_email') self.reviewer_email = attributes[:'reviewer_email'] end if attributes.has_key?(:'reviewer_location') self.reviewer_location = attributes[:'reviewer_location'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'store_feedback') self.store_feedback = attributes[:'store_feedback'] end if attributes.has_key?(:'submitted_dts') self.submitted_dts = attributes[:'submitted_dts'] end if attributes.has_key?(:'title') self.title = attributes[:'title'] end end |
Instance Attribute Details
#customer_profile_oid ⇒ Object
Customer profile object identifier
18 19 20 |
# File 'lib/ultracart_api/models/item_review.rb', line 18 def customer_profile_oid @customer_profile_oid end |
#featured ⇒ Object
Returns the value of attribute featured.
20 21 22 |
# File 'lib/ultracart_api/models/item_review.rb', line 20 def featured @featured end |
#helperful_no_votes ⇒ Object
Returns the value of attribute helperful_no_votes.
22 23 24 |
# File 'lib/ultracart_api/models/item_review.rb', line 22 def helperful_no_votes @helperful_no_votes end |
#helpful_yes_votes ⇒ Object
Returns the value of attribute helpful_yes_votes.
24 25 26 |
# File 'lib/ultracart_api/models/item_review.rb', line 24 def helpful_yes_votes @helpful_yes_votes end |
#order_id ⇒ Object
Returns the value of attribute order_id.
26 27 28 |
# File 'lib/ultracart_api/models/item_review.rb', line 26 def order_id @order_id end |
#overall ⇒ Object
Returns the value of attribute overall.
28 29 30 |
# File 'lib/ultracart_api/models/item_review.rb', line 28 def overall @overall end |
#rating_name1 ⇒ Object
Rating Name 1
31 32 33 |
# File 'lib/ultracart_api/models/item_review.rb', line 31 def @rating_name1 end |
#rating_name10 ⇒ Object
Rating Name 10
34 35 36 |
# File 'lib/ultracart_api/models/item_review.rb', line 34 def @rating_name10 end |
#rating_name2 ⇒ Object
Rating Name 2
37 38 39 |
# File 'lib/ultracart_api/models/item_review.rb', line 37 def @rating_name2 end |
#rating_name3 ⇒ Object
Rating Name 3
40 41 42 |
# File 'lib/ultracart_api/models/item_review.rb', line 40 def @rating_name3 end |
#rating_name4 ⇒ Object
Rating Name 4
43 44 45 |
# File 'lib/ultracart_api/models/item_review.rb', line 43 def @rating_name4 end |
#rating_name5 ⇒ Object
Rating Name 5
46 47 48 |
# File 'lib/ultracart_api/models/item_review.rb', line 46 def @rating_name5 end |
#rating_name6 ⇒ Object
Rating Name 6
49 50 51 |
# File 'lib/ultracart_api/models/item_review.rb', line 49 def @rating_name6 end |
#rating_name7 ⇒ Object
Rating Name 7
52 53 54 |
# File 'lib/ultracart_api/models/item_review.rb', line 52 def @rating_name7 end |
#rating_name8 ⇒ Object
Rating Name 8
55 56 57 |
# File 'lib/ultracart_api/models/item_review.rb', line 55 def @rating_name8 end |
#rating_name9 ⇒ Object
Rating Name 9
58 59 60 |
# File 'lib/ultracart_api/models/item_review.rb', line 58 def @rating_name9 end |
#rating_score1 ⇒ Object
Returns the value of attribute rating_score1.
60 61 62 |
# File 'lib/ultracart_api/models/item_review.rb', line 60 def @rating_score1 end |
#rating_score10 ⇒ Object
Returns the value of attribute rating_score10.
62 63 64 |
# File 'lib/ultracart_api/models/item_review.rb', line 62 def @rating_score10 end |
#rating_score2 ⇒ Object
Returns the value of attribute rating_score2.
64 65 66 |
# File 'lib/ultracart_api/models/item_review.rb', line 64 def @rating_score2 end |
#rating_score3 ⇒ Object
Returns the value of attribute rating_score3.
66 67 68 |
# File 'lib/ultracart_api/models/item_review.rb', line 66 def @rating_score3 end |
#rating_score4 ⇒ Object
Returns the value of attribute rating_score4.
68 69 70 |
# File 'lib/ultracart_api/models/item_review.rb', line 68 def @rating_score4 end |
#rating_score5 ⇒ Object
Returns the value of attribute rating_score5.
70 71 72 |
# File 'lib/ultracart_api/models/item_review.rb', line 70 def @rating_score5 end |
#rating_score6 ⇒ Object
Returns the value of attribute rating_score6.
72 73 74 |
# File 'lib/ultracart_api/models/item_review.rb', line 72 def @rating_score6 end |
#rating_score7 ⇒ Object
Returns the value of attribute rating_score7.
74 75 76 |
# File 'lib/ultracart_api/models/item_review.rb', line 74 def @rating_score7 end |
#rating_score8 ⇒ Object
Returns the value of attribute rating_score8.
76 77 78 |
# File 'lib/ultracart_api/models/item_review.rb', line 76 def @rating_score8 end |
#rating_score9 ⇒ Object
Returns the value of attribute rating_score9.
78 79 80 |
# File 'lib/ultracart_api/models/item_review.rb', line 78 def @rating_score9 end |
#recommend_store_to_friend ⇒ Object
Returns the value of attribute recommend_store_to_friend.
80 81 82 |
# File 'lib/ultracart_api/models/item_review.rb', line 80 def recommend_store_to_friend @recommend_store_to_friend end |
#recommend_to_friend ⇒ Object
Returns the value of attribute recommend_to_friend.
82 83 84 |
# File 'lib/ultracart_api/models/item_review.rb', line 82 def recommend_to_friend @recommend_to_friend end |
#review ⇒ Object
Review
85 86 87 |
# File 'lib/ultracart_api/models/item_review.rb', line 85 def review @review end |
#review_oid ⇒ Object
Returns the value of attribute review_oid.
87 88 89 |
# File 'lib/ultracart_api/models/item_review.rb', line 87 def review_oid @review_oid end |
#reviewed_nickname ⇒ Object
Nickname
90 91 92 |
# File 'lib/ultracart_api/models/item_review.rb', line 90 def reviewed_nickname @reviewed_nickname end |
#reviewer_email ⇒ Object
Reviewer Email
93 94 95 |
# File 'lib/ultracart_api/models/item_review.rb', line 93 def reviewer_email @reviewer_email end |
#reviewer_location ⇒ Object
Location
96 97 98 |
# File 'lib/ultracart_api/models/item_review.rb', line 96 def reviewer_location @reviewer_location end |
#status ⇒ Object
Status of the review
99 100 101 |
# File 'lib/ultracart_api/models/item_review.rb', line 99 def status @status end |
#store_feedback ⇒ Object
Store Feedback
102 103 104 |
# File 'lib/ultracart_api/models/item_review.rb', line 102 def store_feedback @store_feedback end |
#submitted_dts ⇒ Object
Date/time of review submission
105 106 107 |
# File 'lib/ultracart_api/models/item_review.rb', line 105 def submitted_dts @submitted_dts end |
#title ⇒ Object
Title
108 109 110 |
# File 'lib/ultracart_api/models/item_review.rb', line 108 def title @title end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/ultracart_api/models/item_review.rb', line 133 def self.attribute_map { :'customer_profile_oid' => :'customer_profile_oid', :'featured' => :'featured', :'helperful_no_votes' => :'helperful_no_votes', :'helpful_yes_votes' => :'helpful_yes_votes', :'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 |
.swagger_types ⇒ Object
Attribute type mapping.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/ultracart_api/models/item_review.rb', line 176 def self.swagger_types { :'customer_profile_oid' => :'Integer', :'featured' => :'BOOLEAN', :'helperful_no_votes' => :'Integer', :'helpful_yes_votes' => :'Integer', :'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.
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 681 682 |
# File 'lib/ultracart_api/models/item_review.rb', line 642 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 && order_id == o.order_id && overall == o.overall && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && 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 && submitted_dts == o.submitted_dts && title == o.title end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 |
# File 'lib/ultracart_api/models/item_review.rb', line 720 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
786 787 788 789 790 791 792 793 794 795 796 797 798 |
# File 'lib/ultracart_api/models/item_review.rb', line 786 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
699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 |
# File 'lib/ultracart_api/models/item_review.rb', line 699 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
686 687 688 |
# File 'lib/ultracart_api/models/item_review.rb', line 686 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
692 693 694 |
# File 'lib/ultracart_api/models/item_review.rb', line 692 def hash [customer_profile_oid, featured, helperful_no_votes, helpful_yes_votes, order_id, overall, , , , , , , , , , , , , , , , , , , , , recommend_store_to_friend, recommend_to_friend, review, review_oid, reviewed_nickname, reviewer_email, reviewer_location, status, store_feedback, submitted_dts, title].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/ultracart_api/models/item_review.rb', line 377 def list_invalid_properties invalid_properties = Array.new 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_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
766 767 768 |
# File 'lib/ultracart_api/models/item_review.rb', line 766 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
772 773 774 775 776 777 778 779 780 |
# File 'lib/ultracart_api/models/item_review.rb', line 772 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_s ⇒ String
Returns the string representation of the object
760 761 762 |
# File 'lib/ultracart_api/models/item_review.rb', line 760 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/ultracart_api/models/item_review.rb', line 448 def valid? 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 |