Module: BaseApi::Client::Items
- Included in:
- BaseApi::Client
- Defined in:
- lib/base_api/client/items.rb
Instance Method Summary collapse
- #items(option = {}, &block) ⇒ HTTParty::Response
- #items_add(item, &block) ⇒ HTTParty::Response
- #items_add_image(item_image, &block) ⇒ HTTParty::Response
- #items_delete(item_id, &block) ⇒ HTTParty::Response
- #items_delete_image(item_id, image_no, &block) ⇒ HTTParty::Response
- #items_delete_variation(item_id, variation_id, &block) ⇒ HTTParty::Response
- #items_detail(item_id, &block) ⇒ HTTParty::Response
- #items_edit(item, &block) ⇒ HTTParty::Response
- #items_edit_stock(params, &block) ⇒ HTTParty::Response
- #items_search(q, option = {}, &block) ⇒ HTTParty::Response
Instance Method Details
#items(option = {}, &block) ⇒ HTTParty::Response
7 8 9 |
# File 'lib/base_api/client/items.rb', line 7 def items(option = {}, &block) paginate('/1/items', option, &block) end |
#items_add(item, &block) ⇒ HTTParty::Response
29 30 31 |
# File 'lib/base_api/client/items.rb', line 29 def items_add(item, &block) call_post_api('/1/items/add', item, &block) end |
#items_add_image(item_image, &block) ⇒ HTTParty::Response
50 51 52 |
# File 'lib/base_api/client/items.rb', line 50 def items_add_image(item_image, &block) call_post_api('/1/items/add_image', item_image, &block) end |
#items_delete(item_id, &block) ⇒ HTTParty::Response
43 44 45 |
# File 'lib/base_api/client/items.rb', line 43 def items_delete(item_id, &block) call_post_api('/1/items/delete', { item_id: item_id }, &block) end |
#items_delete_image(item_id, image_no, &block) ⇒ HTTParty::Response
58 59 60 |
# File 'lib/base_api/client/items.rb', line 58 def items_delete_image(item_id, image_no, &block) call_post_api('/1/items/delete_image', { item_id: item_id, image_no: image_no }, &block) end |
#items_delete_variation(item_id, variation_id, &block) ⇒ HTTParty::Response
73 74 75 |
# File 'lib/base_api/client/items.rb', line 73 def items_delete_variation(item_id, variation_id, &block) call_post_api('/1/items/delete_variation', { item_id: item_id, variation_id: variation_id }, &block) end |
#items_detail(item_id, &block) ⇒ HTTParty::Response
22 23 24 |
# File 'lib/base_api/client/items.rb', line 22 def items_detail(item_id, &block) call_get_api("/1/items/detail/#{item_id}", &block) end |
#items_edit(item, &block) ⇒ HTTParty::Response
36 37 38 |
# File 'lib/base_api/client/items.rb', line 36 def items_edit(item, &block) call_post_api('/1/items/edit', item, &block) end |
#items_edit_stock(params, &block) ⇒ HTTParty::Response
65 66 67 |
# File 'lib/base_api/client/items.rb', line 65 def items_edit_stock(params, &block) call_post_api('/1/items/edit_stock', params, &block) end |
#items_search(q, option = {}, &block) ⇒ HTTParty::Response
15 16 17 |
# File 'lib/base_api/client/items.rb', line 15 def items_search(q, option = {}, &block) paginate('/1/items/search', { q: q }.merge(option), &block) end |