Class: PlentyClient::Item::Unit
- Inherits:
-
Object
- Object
- PlentyClient::Item::Unit
show all
- Extended by:
- Endpoint, Request
- Defined in:
- lib/plenty_client/item/unit.rb
Constant Summary
collapse
- CREATE_ITEMS_UNITS =
'/items/{itemId}/units'.freeze
- GET_ITEMS_UNIT =
'/items/{itemId}/units'.freeze
- DELETE_ITEMS_UNIT =
'/items/{itemId}/units/{unitId}'.freeze
Class Method Summary
collapse
Methods included from Endpoint
build_endpoint, routes
Methods included from Request
delete, get, patch, post, put, request
Class Method Details
.create(headers = {}) ⇒ Object
13
14
15
|
# File 'lib/plenty_client/item/unit.rb', line 13
def create( = {})
post(build_endpoint(CREATE_ITEMS_UNITS), )
end
|
.delete(unit_id) ⇒ Object
29
30
31
|
# File 'lib/plenty_client/item/unit.rb', line 29
def delete(unit_id)
delete(build_endpoint(DELETE_ITEMS_UNIT, unit: unit_id))
end
|
.find(unit_id, headers = {}, &block) ⇒ Object
21
22
23
|
# File 'lib/plenty_client/item/unit.rb', line 21
def find(unit_id, = {}, &block)
get(build_endpoint(GET_ITEMS_UNIT, unit: unit_id), , &block)
end
|
.list(headers = {}, &block) ⇒ Object
17
18
19
|
# File 'lib/plenty_client/item/unit.rb', line 17
def list( = {}, &block)
get(build_endpoint(GET_ITEMS_UNIT), , &block)
end
|
.update(unit_id, headers = {}, &block) ⇒ Object
25
26
27
|
# File 'lib/plenty_client/item/unit.rb', line 25
def update(unit_id, = {}, &block)
put(build_endpoint(GET_ITEMS_UNIT, unit: unit_id), , &block)
end
|