Class: ShopsavvyDataApi::Deal
- Inherits:
-
Object
- Object
- ShopsavvyDataApi::Deal
- Defined in:
- lib/shopsavvy_data_api/models.rb
Overview
Deal with expert grading
Instance Attribute Summary collapse
-
#comment_count ⇒ Object
readonly
Returns the value of attribute comment_count.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#emoji ⇒ Object
readonly
Returns the value of attribute emoji.
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#grade ⇒ Object
readonly
Returns the value of attribute grade.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#pricing ⇒ Object
readonly
Returns the value of attribute pricing.
-
#product ⇒ Object
readonly
Returns the value of attribute product.
-
#retailer ⇒ Object
readonly
Returns the value of attribute retailer.
-
#subtitle ⇒ Object
readonly
Returns the value of attribute subtitle.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#votes ⇒ Object
readonly
Returns the value of attribute votes.
Instance Method Summary collapse
-
#initialize(data) ⇒ Deal
constructor
A new instance of Deal.
Constructor Details
#initialize(data) ⇒ Deal
Returns a new instance of Deal.
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'lib/shopsavvy_data_api/models.rb', line 491 def initialize(data) @path = data["path"] @title = data["title"] @subtitle = data["subtitle"] @description = data["description"] @emoji = data["emoji"] @grade = data["grade"] @pricing = data["pricing"] @retailer = data["retailer"] @product = data["product"] @url = data["url"] @image = data["image"] @votes = data["votes"] @comment_count = data["comment_count"].to_i @tags = data["tags"] @expires_at = data["expires_at"] @created_at = data["created_at"] end |
Instance Attribute Details
#comment_count ⇒ Object (readonly)
Returns the value of attribute comment_count.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def comment_count @comment_count end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def created_at @created_at end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def description @description end |
#emoji ⇒ Object (readonly)
Returns the value of attribute emoji.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def emoji @emoji end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def expires_at @expires_at end |
#grade ⇒ Object (readonly)
Returns the value of attribute grade.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def grade @grade end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def image @image end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def path @path end |
#pricing ⇒ Object (readonly)
Returns the value of attribute pricing.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def pricing @pricing end |
#product ⇒ Object (readonly)
Returns the value of attribute product.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def product @product end |
#retailer ⇒ Object (readonly)
Returns the value of attribute retailer.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def retailer @retailer end |
#subtitle ⇒ Object (readonly)
Returns the value of attribute subtitle.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def subtitle @subtitle end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def @tags end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def url @url end |
#votes ⇒ Object (readonly)
Returns the value of attribute votes.
487 488 489 |
# File 'lib/shopsavvy_data_api/models.rb', line 487 def votes @votes end |