Class: PlentyClient::Listing::OptionTemplate
- Inherits:
-
Object
- Object
- PlentyClient::Listing::OptionTemplate
- Defined in:
- lib/plenty_client/listing/option_template.rb
Constant Summary collapse
- PREVIEW_LISTINGS_OPTION_TEMPLATE =
'/listings/option_templates/preview'
- FIND_LISTINGS_OPTION_TEMPLATE =
'/listings/option_templates/{optionTemplateId}'
- CREATE_LISTINGS_OPTION_TEMPLATE =
'/listings/option_templates'
- UPDATE_LISTINGS_OPTION_TEMPLATE =
'/listings/option_templates/{optionTemplateId}'
- DELTE_LISTINGS_OPTION_TEMPLATE =
'/listings/option_templates/{optionTemplateId}'
Class Method Summary collapse
- .create(body = {}) ⇒ Object
- .destroy(option_template_id, body = {}) ⇒ Object
- .find(option_template_id, headers = {}, &block) ⇒ Object
- .preview(headers = {}, &block) ⇒ Object
- .update(option_template_id, body = {}) ⇒ Object
Methods included from Request
Methods included from Endpoint
Class Method Details
.create(body = {}) ⇒ Object
24 25 26 |
# File 'lib/plenty_client/listing/option_template.rb', line 24 def create(body = {}) post(build_endpoint(CREATE_LISTINGS_OPTION_TEMPLATE), body) end |
.destroy(option_template_id, body = {}) ⇒ Object
32 33 34 |
# File 'lib/plenty_client/listing/option_template.rb', line 32 def destroy(option_template_id, body = {}) delete(build_endpoint(DELTE_LISTINGS_OPTION_TEMPLATE, option_template: option_template_id), body) end |
.find(option_template_id, headers = {}, &block) ⇒ Object
20 21 22 |
# File 'lib/plenty_client/listing/option_template.rb', line 20 def find(option_template_id, headers = {}, &block) get(build_endpoint(FIND_LISTINGS_OPTION_TEMPLATE, option_template: option_template_id), headers, &block) end |
.preview(headers = {}, &block) ⇒ Object
16 17 18 |
# File 'lib/plenty_client/listing/option_template.rb', line 16 def preview(headers = {}, &block) get(build_endpoint(PREVIEW_LISTINGS_OPTION_TEMPLATE), headers, &block) end |
.update(option_template_id, body = {}) ⇒ Object
28 29 30 |
# File 'lib/plenty_client/listing/option_template.rb', line 28 def update(option_template_id, body = {}) put(build_endpoint(UPDATE_LISTINGS_OPTION_TEMPLATE, option_template: option_template_id), body) end |