Class: PlentyClient::Listing::LayoutTemplate

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

Constant Summary collapse

FIND_LISTINGS_LAYOUT_TEMPLATE =
'/listings/layout_templates/{layoutTemplateId}'
CREATE_LISTINGS_LAYOUT_TEMPLATE =
'/listings/layout_templates'
DELTE_LISTINGS_LAYOUT_TEMPLATE =
'/listings/layout_templates/{layoutTemplateId}'

Class Method Summary collapse

Methods included from Request

included

Methods included from Endpoint

included

Class Method Details

.create(body = {}) ⇒ Object



18
19
20
# File 'lib/plenty_client/listing/layout_template.rb', line 18

def create(body = {})
  post(build_endpoint(CREATE_LISTINGS_LAYOUT_TEMPLATE), body)
end

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



22
23
24
# File 'lib/plenty_client/listing/layout_template.rb', line 22

def destroy(layout_template_id, body = {})
  delete(build_endpoint(DELTE_LISTINGS_LAYOUT_TEMPLATE, layout_template: layout_template_id), body)
end

.find(layout_template_id, headers = {}, &block) ⇒ Object



14
15
16
# File 'lib/plenty_client/listing/layout_template.rb', line 14

def find(layout_template_id, headers = {}, &block)
  get(build_endpoint(FIND_LISTINGS_LAYOUT_TEMPLATE, layout_template: layout_template_id), headers, &block)
end