Module: PlentyClient::Item::Property
- Includes:
- Endpoint, Request
- Defined in:
- lib/plenty_client.rb,
lib/plenty_client/item/property.rb,
lib/plenty_client/item/property/name.rb,
lib/plenty_client/item/property/market_reference.rb
Defined Under Namespace
Classes: MarketReference, Name
Constant Summary
collapse
- LIST_ALL_PROPERTIES =
'/items/properties'
- GET_PROPERTY =
'/items/properties/{propertyId}'
- CREATE_PROPERTY =
'/items/properties'
- UPDATE_PROPERTY =
'/items/properties/{propertyId}'
- DELETE_PROPERTY =
'/items/properties/{propertyId}'
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/property.rb', line 24
def create( = {})
post(build_endpoint(CREATE_PROPERTY), )
end
|
.destroy(property_id) ⇒ Object
32
33
34
|
# File 'lib/plenty_client/item/property.rb', line 32
def destroy(property_id)
delete(build_endpoint(DELETE_PROPERTY, property: property_id))
end
|
.find(property_id, headers = {}, &block) ⇒ Object
20
21
22
|
# File 'lib/plenty_client/item/property.rb', line 20
def find(property_id, = {}, &block)
get(build_endpoint(GET_PROPERTY, property: property_id), , &block)
end
|
.list(headers = {}, &block) ⇒ Object
16
17
18
|
# File 'lib/plenty_client/item/property.rb', line 16
def list( = {}, &block)
get(build_endpoint(LIST_ALL_PROPERTIES), , &block)
end
|
.update(property_id, headers = {}) ⇒ Object
28
29
30
|
# File 'lib/plenty_client/item/property.rb', line 28
def update(property_id, = {})
put(build_endpoint(UPDATE_PROPERTY, property: property_id), )
end
|