Class: PlentyClient::Item::Unit
- Inherits:
-
Object
- Object
- PlentyClient::Item::Unit
- Defined in:
- lib/plenty_client/item/unit.rb
Constant Summary collapse
- CREATE_ITEMS_UNITS =
'/items/units'
- LIST_ITEM_UNITS =
'/items/units'
- GET_ITEMS_UNIT =
'/items/units'
- UPDATE_ITEM_UNIT =
'/items/units/{unitId}'
- DELETE_ITEMS_UNIT =
'/items/units/{unitId}'
Class Method Summary collapse
- .create(headers = {}) ⇒ Object
- .destroy(unit_id) ⇒ Object
- .find(unit_id, headers = {}, &block) ⇒ Object
- .list(headers = {}, &block) ⇒ Object
- .update(unit_id, headers = {}, &block) ⇒ Object
Methods included from Request
Methods included from Endpoint
Class Method Details
.create(headers = {}) ⇒ Object
16 17 18 |
# File 'lib/plenty_client/item/unit.rb', line 16 def create(headers = {}) post(build_endpoint(CREATE_ITEMS_UNITS), headers) end |
.destroy(unit_id) ⇒ Object
32 33 34 |
# File 'lib/plenty_client/item/unit.rb', line 32 def destroy(unit_id) delete(build_endpoint(DELETE_ITEMS_UNIT, unit: unit_id)) end |
.find(unit_id, headers = {}, &block) ⇒ Object
24 25 26 |
# File 'lib/plenty_client/item/unit.rb', line 24 def find(unit_id, headers = {}, &block) get(build_endpoint(GET_ITEMS_UNIT, unit: unit_id), headers, &block) end |
.list(headers = {}, &block) ⇒ Object
20 21 22 |
# File 'lib/plenty_client/item/unit.rb', line 20 def list(headers = {}, &block) get(build_endpoint(LIST_ITEM_UNITS), headers, &block) end |
.update(unit_id, headers = {}, &block) ⇒ Object
28 29 30 |
# File 'lib/plenty_client/item/unit.rb', line 28 def update(unit_id, headers = {}, &block) put(build_endpoint(UPDATE_ITEM_UNIT, unit: unit_id), headers, &block) end |