Class: PlentyClient::Item::Property::Name
- Inherits:
-
Object
- Object
- PlentyClient::Item::Property::Name
- Defined in:
- lib/plenty_client/item/property/name.rb
Constant Summary collapse
- ITEM_PROPERTY_PATH =
'/items/properties'
- CREATE_ITEM_PROPERTIES =
'/{propertyId}/names'
- LIST_ITEM_PROPERTY =
'/{propertyId}/names'
- GET_ITEMS_PROPERTY =
'/{propertyId}/names/{lang}'
- UPDATE_ITEMS_PROPERTY =
'/{propertyId}/names/{lang}'
- DELETE_ITEMS_PROPERTY =
'/{propertyId}/names/{lang}'
Class Method Summary collapse
- .create(property_id, headers = {}) ⇒ Object
- .destroy(property_id, lang) ⇒ Object
- .find(property_id, lang, headers = {}, &block) ⇒ Object
- .list(property_id, headers = {}, &block) ⇒ Object
- .update(property_id, lang, body = {}) ⇒ Object
Methods included from Request
Methods included from Endpoint
Class Method Details
.create(property_id, headers = {}) ⇒ Object
19 20 21 22 |
# File 'lib/plenty_client/item/property/name.rb', line 19 def create(property_id, headers = {}) post(build_endpoint("#{ITEM_PROPERTY_PATH}#{CREATE_ITEM_PROPERTIES}", property: property_id), headers) end |
.destroy(property_id, lang) ⇒ Object
41 42 43 44 |
# File 'lib/plenty_client/item/property/name.rb', line 41 def destroy(property_id, lang) delete(build_endpoint("#{ITEM_PROPERTY_PATH}#{DELETE_ITEMS_PROPERTY}", property: property_id, lang: lang)) end |
.find(property_id, lang, headers = {}, &block) ⇒ Object
29 30 31 32 33 |
# File 'lib/plenty_client/item/property/name.rb', line 29 def find(property_id, lang, headers = {}, &block) get(build_endpoint("#{ITEM_PROPERTY_PATH}#{GET_ITEMS_PROPERTY}", property: property_id, lang: lang), headers, &block) end |
.list(property_id, headers = {}, &block) ⇒ Object
24 25 26 27 |
# File 'lib/plenty_client/item/property/name.rb', line 24 def list(property_id, headers = {}, &block) get(build_endpoint("#{ITEM_PROPERTY_PATH}#{LIST_ITEM_PROPERTY}", property: property_id), headers, &block) end |
.update(property_id, lang, body = {}) ⇒ Object
35 36 37 38 39 |
# File 'lib/plenty_client/item/property/name.rb', line 35 def update(property_id, lang, body = {}) put(build_endpoint("#{ITEM_PROPERTY_PATH}#{UPDATE_ITEMS_PROPERTY}", property: property_id, lang: lang), body) end |