Class: PlentyClient::Item::PropertyGroup
- Inherits:
-
Object
- Object
- PlentyClient::Item::PropertyGroup
- Defined in:
- lib/plenty_client/item/property_group.rb
Constant Summary collapse
- LIST_ALL_PROPERTY_GROUPS =
'/items/property_groups'
- GET_PROPERTY_GROUP =
'/items/property_groups/{propertyGroupId}'
- CREATE_PROPERTY_GROUP =
'/items/property_groups'
- UPDATE_PROPERTY_GROUP =
'/items/property_groups/{propertyGroupId}'
- DELETE_PROPERTY_GROUP =
'/items/property_groups/{propertyGroupId}'
Class Method Summary collapse
- .create(body = {}) ⇒ Object
- .destroy(property_group_id) ⇒ Object
- .find(property_group_id, headers = {}, &block) ⇒ Object
- .list(headers = {}, &block) ⇒ Object
- .update(property_group_id, body = {}) ⇒ Object
Methods included from Request
Methods included from Endpoint
Class Method Details
.create(body = {}) ⇒ Object
24 25 26 |
# File 'lib/plenty_client/item/property_group.rb', line 24 def create(body = {}) post(build_endpoint(CREATE_PROPERTY_GROUP), body) end |
.destroy(property_group_id) ⇒ Object
32 33 34 |
# File 'lib/plenty_client/item/property_group.rb', line 32 def destroy(property_group_id) delete(build_endpoint(DELETE_PROPERTY_GROUP, property_group: property_group_id)) end |
.find(property_group_id, headers = {}, &block) ⇒ Object
20 21 22 |
# File 'lib/plenty_client/item/property_group.rb', line 20 def find(property_group_id, headers = {}, &block) get(build_endpoint(GET_PROPERTY_GROUP, property_group: property_group_id), headers, &block) end |
.list(headers = {}, &block) ⇒ Object
16 17 18 |
# File 'lib/plenty_client/item/property_group.rb', line 16 def list(headers = {}, &block) get(build_endpoint(LIST_ALL_PROPERTY_GROUPS), headers, &block) end |
.update(property_group_id, body = {}) ⇒ Object
28 29 30 |
# File 'lib/plenty_client/item/property_group.rb', line 28 def update(property_group_id, body = {}) put(build_endpoint(UPDATE_PROPERTY_GROUP, property_group: property_group_id), body) end |