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'.freeze
- GET_PROPERTY =
'/items/properties/{propertyId}'.freeze
- CREATE_PROPERTY =
'/items/properties'.freeze
- UPDATE_PROPERTY =
'/items/properties/{propertyId}'.freeze
- DELETE_PROPERTY =
'/items/properties/{propertyId}'.freeze
Class Method Summary
collapse
Methods included from Request
included
Methods included from Endpoint
included
Class Method Details
.create(headers = {}) ⇒ Object
22
23
24
|
# File 'lib/plenty_client/item/property.rb', line 22
def create( = {})
post(build_endpoint(CREATE_PROPERTY), )
end
|
.destroy(property_id) ⇒ Object
30
31
32
|
# File 'lib/plenty_client/item/property.rb', line 30
def destroy(property_id)
delete(build_endpoint(DELETE_PROPERTY, property: property_id))
end
|
.find(property_id, headers = {}, &block) ⇒ Object
18
19
20
|
# File 'lib/plenty_client/item/property.rb', line 18
def find(property_id, = {}, &block)
get(build_endpoint(GET_PROPERTY, property: property_id), , &block)
end
|
.list(headers = {}, &block) ⇒ Object
14
15
16
|
# File 'lib/plenty_client/item/property.rb', line 14
def list( = {}, &block)
get(build_endpoint(LIST_ALL_PROPERTIES), , &block)
end
|
.update(property_id, headers = {}) ⇒ Object
26
27
28
|
# File 'lib/plenty_client/item/property.rb', line 26
def update(property_id, = {})
put(build_endpoint(UPDATE_PROPERTY, property: property_id), )
end
|