Class: PlentyClient::Item::Attribute::Name
- Inherits:
-
Object
- Object
- PlentyClient::Item::Attribute::Name
- Defined in:
- lib/plenty_client/item/attribute/name.rb
Constant Summary collapse
- ITEM_ATTRIBUTE_PATH =
'/items/attributes'
- CREATE_ITEM_ATTRIBUTES =
'/{attributeId}/names'
- LIST_ITEM_ATTRIBUTE =
'/{attributeId}/names'
- GET_ITEMS_ATTRIBUTE =
'/{attributeId}/names/{lang}'
- UPDATE_ITEMS_ATTRIBUTE =
'/{attributeId}/names/{lang}'
- DELETE_ITEMS_ATTRIBUTE =
'/{attributeId}/names/{lang}'
Class Method Summary collapse
- .create(attribute_id, headers = {}) ⇒ Object
- .destroy(attribute_id, lang) ⇒ Object
- .find(attribute_id, lang, headers = {}, &block) ⇒ Object
- .list(attribute_id, headers = {}, &block) ⇒ Object
- .update(attribute_id, lang, body = {}) ⇒ Object
Methods included from Request
Methods included from Endpoint
Class Method Details
.create(attribute_id, headers = {}) ⇒ Object
19 20 21 |
# File 'lib/plenty_client/item/attribute/name.rb', line 19 def create(attribute_id, headers = {}) post(build_endpoint("#{ITEM_ATTRIBUTE_PATH}#{CREATE_ITEM_ATTRIBUTES}", attribute: attribute_id), headers) end |
.destroy(attribute_id, lang) ⇒ Object
38 39 40 41 |
# File 'lib/plenty_client/item/attribute/name.rb', line 38 def destroy(attribute_id, lang) delete(build_endpoint("#{ITEM_ATTRIBUTE_PATH}#{DELETE_ITEMS_ATTRIBUTE}", attribute: attribute_id, lang: lang)) end |
.find(attribute_id, lang, headers = {}, &block) ⇒ Object
28 29 30 31 |
# File 'lib/plenty_client/item/attribute/name.rb', line 28 def find(attribute_id, lang, headers = {}, &block) get(build_endpoint("#{ITEM_ATTRIBUTE_PATH}#{GET_ITEMS_ATTRIBUTE}", attribute: attribute_id, lang: lang), headers, &block) end |
.list(attribute_id, headers = {}, &block) ⇒ Object
23 24 25 26 |
# File 'lib/plenty_client/item/attribute/name.rb', line 23 def list(attribute_id, headers = {}, &block) get(build_endpoint("#{ITEM_ATTRIBUTE_PATH}#{LIST_ITEM_ATTRIBUTE}", attribute: attribute_id), headers, &block) end |
.update(attribute_id, lang, body = {}) ⇒ Object
33 34 35 36 |
# File 'lib/plenty_client/item/attribute/name.rb', line 33 def update(attribute_id, lang, body = {}) put(build_endpoint("#{ITEM_ATTRIBUTE_PATH}#{UPDATE_ITEMS_ATTRIBUTE}", attribute: attribute_id, lang: lang), body) end |