Module: YahooStoreApi::Stock
- Includes:
- Helper
- Included in:
- Client
- Defined in:
- lib/yahoo_store_api/stock/get_stock.rb,
lib/yahoo_store_api/stock/set_stock.rb
Constant Summary
Constants included
from Helper
Helper::ENDPOINT
Instance Method Summary
collapse
Methods included from Helper
#connection, #error_parser, #handler, #response_parser
Instance Method Details
#get_stock(item_code) ⇒ Object
5
6
7
8
9
|
# File 'lib/yahoo_store_api/stock/get_stock.rb', line 5
def get_stock(item_code)
handler connection("getStock").post { |r|
r.body = "seller_id=#{@seller_id}&item_code=#{item_code}"
}
end
|
#set_stock(hash) ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/yahoo_store_api/stock/set_stock.rb', line 5
def set_stock(hash)
request = "seller_id=#{@seller_id}&#{URI.encode_www_form(hash)}"
handler connection("setStock").post { |r|
r.body = request
}
end
|