Class: ShopsavvyDataApi::Deal

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

Overview

Deal with expert grading

Instance Attribute Summary collapse

Instance Method Summary collapse

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_countObject (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_atObject (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

#descriptionObject (readonly)

Returns the value of attribute description.



487
488
489
# File 'lib/shopsavvy_data_api/models.rb', line 487

def description
  @description
end

#emojiObject (readonly)

Returns the value of attribute emoji.



487
488
489
# File 'lib/shopsavvy_data_api/models.rb', line 487

def emoji
  @emoji
end

#expires_atObject (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

#gradeObject (readonly)

Returns the value of attribute grade.



487
488
489
# File 'lib/shopsavvy_data_api/models.rb', line 487

def grade
  @grade
end

#imageObject (readonly)

Returns the value of attribute image.



487
488
489
# File 'lib/shopsavvy_data_api/models.rb', line 487

def image
  @image
end

#pathObject (readonly)

Returns the value of attribute path.



487
488
489
# File 'lib/shopsavvy_data_api/models.rb', line 487

def path
  @path
end

#pricingObject (readonly)

Returns the value of attribute pricing.



487
488
489
# File 'lib/shopsavvy_data_api/models.rb', line 487

def pricing
  @pricing
end

#productObject (readonly)

Returns the value of attribute product.



487
488
489
# File 'lib/shopsavvy_data_api/models.rb', line 487

def product
  @product
end

#retailerObject (readonly)

Returns the value of attribute retailer.



487
488
489
# File 'lib/shopsavvy_data_api/models.rb', line 487

def retailer
  @retailer
end

#subtitleObject (readonly)

Returns the value of attribute subtitle.



487
488
489
# File 'lib/shopsavvy_data_api/models.rb', line 487

def subtitle
  @subtitle
end

#tagsObject (readonly)

Returns the value of attribute tags.



487
488
489
# File 'lib/shopsavvy_data_api/models.rb', line 487

def tags
  @tags
end

#titleObject (readonly)

Returns the value of attribute title.



487
488
489
# File 'lib/shopsavvy_data_api/models.rb', line 487

def title
  @title
end

#urlObject (readonly)

Returns the value of attribute url.



487
488
489
# File 'lib/shopsavvy_data_api/models.rb', line 487

def url
  @url
end

#votesObject (readonly)

Returns the value of attribute votes.



487
488
489
# File 'lib/shopsavvy_data_api/models.rb', line 487

def votes
  @votes
end