Class: Top4R::TaobaokeItem

Inherits:
Object
  • Object
show all
Includes:
ModelMixin
Defined in:
lib/top4r/model/taobaokeitem.rb

Overview

TaobaokeItem Model

Constant Summary collapse

@@ATTRIBUTES =
[:id, :iid, :num_iid, :title, :nick, :pic_url, :price, :click_url, :commission, :commission_rate, 
:commission_num, :commission_volume, :shop_click_url, :seller_credit_score, :item_location, :volume]

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ModelMixin

included

Class Method Details

.attributesObject



33
# File 'lib/top4r/model/taobaokeitem.rb', line 33

def attributes; @@ATTRIBUTES; end

.default_public_fieldsObject



35
36
37
# File 'lib/top4r/model/taobaokeitem.rb', line 35

def default_public_fields
  ["iid", "num_iid", "title", "pic_url", "price", "nick", "click_url"]
end

Instance Method Details

#unmarshal_other_attrsObject



40
41
42
43
44
# File 'lib/top4r/model/taobaokeitem.rb', line 40

def unmarshal_other_attrs
  @id = @iid
  
  self
end