module PlentyClient::Item
Constants
- CREATE_ITEM
- DELETE_ITEM
- GET_ITEM
- LIST_ITEMS
- UPDATE_ITEM
Public Class Methods
create(body = {})
click to toggle source
# File lib/plenty_client/item.rb, line 27 def create(body = {}) post(CREATE_ITEM, body) end
destroy(item_id, body = {})
click to toggle source
# File lib/plenty_client/item.rb, line 31 def destroy(item_id, body = {}) delete(build_endpoint(DELETE_ITEM, item: item_id), body) end
find(item_id = nil, headers = {}, &block)
click to toggle source
# File lib/plenty_client/item.rb, line 19 def find(item_id = nil, headers = {}, &block) get(build_endpoint(GET_ITEM, item: item_id), headers, &block) end
list(headers = {}, &block)
click to toggle source
# File lib/plenty_client/item.rb, line 15 def list(headers = {}, &block) get(build_endpoint(LIST_ITEMS), headers, &block) end
update(item_id, body = {})
click to toggle source
# File lib/plenty_client/item.rb, line 23 def update(item_id, body = {}) put(build_endpoint(UPDATE_ITEM, item: item_id), body) end