Module: PlentyClient::Item::Attribute
- Includes:
- Endpoint, Request
- Defined in:
- lib/plenty_client.rb,
lib/plenty_client/item/attribute.rb,
lib/plenty_client/item/attribute/name.rb,
lib/plenty_client/item/attribute/value.rb,
lib/plenty_client/item/attribute/value_name.rb
Defined Under Namespace
Classes: Name, Value, ValueName
Constant Summary
collapse
- CREATE_ATTRIBUTE =
'/items/attributes'
- LIST_ATTRIBUTES =
'/items/attributes'
- GET_ATTRIBUTE =
'/items/attributes/{attributeId}'
- UPDATE_ATTRIBUTE =
'/items/attributes/{attributeId}'
- DELETE_ATTRIBUTE =
'/items/attributes/{attributeId}'
Class Method Summary
collapse
Methods included from Request
included
Methods included from Endpoint
included
Class Method Details
.create(headers = {}) ⇒ Object
24
25
26
|
# File 'lib/plenty_client/item/attribute.rb', line 24
def create( = {})
post(build_endpoint(CREATE_ATTRIBUTE), )
end
|
.destroy(attribute_id) ⇒ Object
32
33
34
|
# File 'lib/plenty_client/item/attribute.rb', line 32
def destroy(attribute_id)
delete(build_endpoint(DELETE_attribute, attribute: attribute_id))
end
|
.find(attribute_id, headers = {}, &block) ⇒ Object
20
21
22
|
# File 'lib/plenty_client/item/attribute.rb', line 20
def find(attribute_id, = {}, &block)
get(build_endpoint(GET_ATTRIBUTE, attribute: attribute_id), , &block)
end
|
.list(headers = {}, &block) ⇒ Object
16
17
18
|
# File 'lib/plenty_client/item/attribute.rb', line 16
def list( = {}, &block)
get(build_endpoint(LIST_ATTRIBUTES), , &block)
end
|
.update(attribute_id, headers = {}) ⇒ Object
28
29
30
|
# File 'lib/plenty_client/item/attribute.rb', line 28
def update(attribute_id, = {})
post(build_endpoint(UPDATE_ATTRIBUTE, attribute: attribute_id), )
end
|