Class: PlentyClient::Item::Attribute::Value
- Inherits:
-
Object
- Object
- PlentyClient::Item::Attribute::Value
- Defined in:
- lib/plenty_client/item/attribute/value.rb
Constant Summary collapse
- ITEM_ATTRIBUTE_PATH =
'/items/attributes'
- CREATE_ITEM_ATTRIBUTE_VALUES =
'/{attributeId}/values'
- LIST_ITEM_ATTRIBUTE_VALUE =
'/{attributeId}/values'
- GET_ITEMS_ATTRIBUTE_VALUE =
'/{attributeId}/values/{valueId}'
- UPDATE_ITEMS_ATTRIBUTE_VALUE =
'/{attributeId}/values/{valueId}'
- DELETE_ITEMS_ATTRIBUTE_VALUE =
'/{attributeId}/values/{valueId}'
Class Method Summary collapse
- .create(attribute_id, body = {}) ⇒ Object
- .destroy(attribute_id, value_id) ⇒ Object
- .find(attribute_id, value_id, headers = {}, &block) ⇒ Object
- .list(attribute_id, headers = {}, &block) ⇒ Object
- .update(attribute_id, value_id, body = {}, &block) ⇒ Object
Methods included from Request
Methods included from Endpoint
Class Method Details
.create(attribute_id, body = {}) ⇒ Object
19 20 21 22 |
# File 'lib/plenty_client/item/attribute/value.rb', line 19 def create(attribute_id, body = {}) post(build_endpoint("#{ITEM_ATTRIBUTE_PATH}#{CREATE_ITEM_ATTRIBUTE_VALUES}", attribute: attribute_id), body) end |
.destroy(attribute_id, value_id) ⇒ Object
41 42 43 44 |
# File 'lib/plenty_client/item/attribute/value.rb', line 41 def destroy(attribute_id, value_id) delete(build_endpoint("#{ITEM_ATTRIBUTE_PATH}#{DELETE_ITEMS_ATTRIBUTE_VALUE}", attribute: attribute_id, value: value_id)) end |
.find(attribute_id, value_id, headers = {}, &block) ⇒ Object
29 30 31 32 33 |
# File 'lib/plenty_client/item/attribute/value.rb', line 29 def find(attribute_id, value_id, headers = {}, &block) get(build_endpoint("#{ITEM_ATTRIBUTE_PATH}#{GET_ITEMS_ATTRIBUTE_VALUE}", attribute: attribute_id, value: value_id), headers, &block) end |
.list(attribute_id, headers = {}, &block) ⇒ Object
24 25 26 27 |
# File 'lib/plenty_client/item/attribute/value.rb', line 24 def list(attribute_id, headers = {}, &block) get(build_endpoint("#{ITEM_ATTRIBUTE_PATH}#{LIST_ITEM_ATTRIBUTE_VALUE}", attribute: attribute_id), headers, &block) end |
.update(attribute_id, value_id, body = {}, &block) ⇒ Object
35 36 37 38 39 |
# File 'lib/plenty_client/item/attribute/value.rb', line 35 def update(attribute_id, value_id, body = {}, &block) put(build_endpoint("#{ITEM_ATTRIBUTE_PATH}#{UPDATE_ITEMS_ATTRIBUTE_VALUE}", attribute: attribute_id, value: value_id), body, &block) end |