Class: Top4R::Order

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

Overview

Order model

Constant Summary collapse

@@ATTRIBUTES =
[:id, :iid, :sku_id, :sku_properties_name, :item_meal_name, :num, :title, 
:price, :pic_path, :seller_nick, :buyer_nick, :type, :created, :refund_status, :oid, 
:outer_iid, :outer_sku_id, :total_fee, :payment, :discount_fee, :adjust_fee, :status, 
:snapshot_url, :snapshot, :timeout_action_time, :buyer_rate, :seller_rate, :refund_id, 
:seller_type, :modified, :num_iid]

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ModelMixin

included

Class Method Details

.attributesObject



14
# File 'lib/top4r/model/trade.rb', line 14

def attributes; @@ATTRIBUTES; end

.default_public_fieldsObject



16
17
18
19
# File 'lib/top4r/model/trade.rb', line 16

def default_public_fields
  ["orders.title", "orders.price", "orders.num", "orders.iid", "orders.status", "orders.tid", 
    "orders.total_fee", "orders.payment", "orders.pic_path"]
end

Instance Method Details

#confirm_feesObject



22
23
24
# File 'lib/top4r/model/trade.rb', line 22

def confirm_fees
  @client.trade(@tid, :confirmfee, {:is_detail => "IS_CHILD"})
end

#unmarshal_other_attrsObject



26
27
28
29
# File 'lib/top4r/model/trade.rb', line 26

def unmarshal_other_attrs
  @id = 0
  self
end