Module: PlentyClient::Category
- Includes:
- Endpoint, Request
- Defined in:
- lib/plenty_client.rb,
lib/plenty_client/category.rb,
lib/plenty_client/category/branch.rb,
lib/plenty_client/category/template.rb
Defined Under Namespace
Classes: Branch, Template
Constant Summary
collapse
- FIND_CATEGORY =
'/categories/{catId}'
- LIST_CATEGORIES =
'/categories'
- CREATE_CATEGORY =
'/categories'
- UPDATE_CATEGORY =
'/categories/{catId}'
- UPDATE_CATEGORIES =
'/categories'
- DELETE_CATEGORY =
'/categories/{catId}'
- DELETE_CATEGORY_DETAILS =
'/categories/{catId}/details'
- DELETE_CATEGORY_CLIENTS =
'/categories/{catId}/clients'
Class Method Summary
collapse
Methods included from Request
included
Methods included from Endpoint
included
Class Method Details
.create(body = {}) ⇒ Object
26
27
28
|
# File 'lib/plenty_client/category.rb', line 26
def create(body = {})
post(CREATE_CATEGORY, body)
end
|
.destroy(cat_id, body = {}) ⇒ Object
38
39
40
|
# File 'lib/plenty_client/category.rb', line 38
def destroy(cat_id, body = {})
delete(build_endpoint(DELETE_CATEGORY, cat: cat_id), body)
end
|
.destroy_clients(cat_id, body = {}) ⇒ Object
46
47
48
|
# File 'lib/plenty_client/category.rb', line 46
def destroy_clients(cat_id, body = {})
delete(build_endpoint(DELETE_CATEGORY_CLIENTS, cat: cat_id), body)
end
|
.destroy_details(cat_id, body = {}) ⇒ Object
42
43
44
|
# File 'lib/plenty_client/category.rb', line 42
def destroy_details(cat_id, body = {})
delete(build_endpoint(DELETE_CATEGORY_DETAILS, cat: cat_id), body)
end
|
.find(cat_id = nil, headers = {}, &block) ⇒ Object
22
23
24
|
# File 'lib/plenty_client/category.rb', line 22
def find(cat_id = nil, = {}, &block)
get(build_endpoint(FIND_CATEGORY, cat: cat_id), , &block)
end
|
.list(headers = {}, &block) ⇒ Object
18
19
20
|
# File 'lib/plenty_client/category.rb', line 18
def list( = {}, &block)
get(build_endpoint(LIST_CATEGORIES), , &block)
end
|
.update(cat_id, body = {}) ⇒ Object
30
31
32
|
# File 'lib/plenty_client/category.rb', line 30
def update(cat_id, body = {})
put(build_endpoint(UPDATE_CATEGORY, cat: cat_id), body)
end
|
.update_all(body = {}) ⇒ Object
34
35
36
|
# File 'lib/plenty_client/category.rb', line 34
def update_all(body = {})
put(build_endpoint(UPDATE_CATEGORIES), body)
end
|