Class: PlentyClient::Category::Template

Inherits:
Object
  • Object
show all
Includes:
Endpoint, Request
Defined in:
lib/plenty_client/category/template.rb

Constant Summary collapse

FIND_CATEGORY_TEMPLATE =
'/categories/{catId}/templates'
UPDATE_CATEGORY_TEMPLATE =
'/categories/{catId}/templates'
DELETE_CATEGORY_TEMPLATE =
'/categories/{catId}/templates'

Class Method Summary collapse

Methods included from Request

included

Methods included from Endpoint

included

Class Method Details

.destroy(cat_id, body = {}) ⇒ Object



24
25
26
27
# File 'lib/plenty_client/category/template.rb', line 24

def destroy(cat_id, body = {})
  delete(build_endpoint(DELETE_CATEGORY_TEMPLATE,
                        cat: cat_id), body)
end

.list(cat_id, headers = {}, &block) ⇒ Object



14
15
16
17
# File 'lib/plenty_client/category/template.rb', line 14

def list(cat_id, headers = {}, &block)
  get(build_endpoint(LIST_BASKET_ITEMS,
                     cat: cat_id), headers, &block)
end

.update(cat_id, body = {}) ⇒ Object



19
20
21
22
# File 'lib/plenty_client/category/template.rb', line 19

def update(cat_id, body = {})
  put(build_endpoint(UPDATE_CATEGORY_TEMPLATE,
                     cat: cat_id), body)
end