Class: PlentyClient::Item::PropertyGroup
- Inherits:
-
Object
- Object
- PlentyClient::Item::PropertyGroup
show all
- Extended by:
- Endpoint, Request
- Defined in:
- lib/plenty_client/item/property_group.rb
Constant Summary
collapse
- LIST_ALL_PROPERTY_GROUPS =
'/items/property_groups'.freeze
- GET_PROPERTY_GROUP =
'/items/property_groups/{propertyGroupId}'.freeze
- CREATE_PROPERTY_GROUP =
'/items/property_groups'.freeze
- UPDATE_PROPERTY_GROUP =
'/items/property_groups/{propertyGroupId}'.freeze
- DELETE_PROPERTY_GROUP =
'/items/property_groups/{propertyGroupId}'.freeze
Class Method Summary
collapse
Methods included from Endpoint
build_endpoint, routes
Methods included from Request
delete, get, patch, post, put, request
Class Method Details
.create(body = {}) ⇒ Object
22
23
24
|
# File 'lib/plenty_client/item/property_group.rb', line 22
def create(body = {})
post(build_endpoint(CREATE_PROPERTY_GROUP), body)
end
|
.delete(property_group_id) ⇒ Object
30
31
32
|
# File 'lib/plenty_client/item/property_group.rb', line 30
def delete(property_group_id)
delete(build_endpoint(DELETE_PROPERTY_GROUP, property_group: property_group_id))
end
|
.find(property_group_id, headers = {}, &block) ⇒ Object
18
19
20
|
# File 'lib/plenty_client/item/property_group.rb', line 18
def find(property_group_id, = {}, &block)
get(build_endpoint(GET_PROPERTY_GROUP, property_group: property_group_id), , &block)
end
|
.list(headers = {}, &block) ⇒ Object
14
15
16
|
# File 'lib/plenty_client/item/property_group.rb', line 14
def list( = {}, &block)
get(build_endpoint(LIST_ALL_PROPERTY_GROUPS), , &block)
end
|
.update(property_group_id, body = {}) ⇒ Object
26
27
28
|
# File 'lib/plenty_client/item/property_group.rb', line 26
def update(property_group_id, body = {})
put(build_endpoint(UPDATE_PROPERTY_GROUP, property_group: property_group_id), body)
end
|