Module: Lelylan::Client::Property
- Included in:
- Lelylan::Client
- Defined in:
- lib/lelylan/client/property.rb
Instance Method Summary collapse
-
#create_property(params = {}) ⇒ Object
Public: Create a property and returns extended information for it.
-
#delete_property(id) ⇒ Object
Public: Delete a property identified from its ID and returns extended information for it.
-
#properties(params = {}) ⇒ Object
Public: Returns a list of owned properties.
-
#property(id) ⇒ Object
Public: Returns extended information for a given property identified from its ID.
-
#public_properties(params = {}) ⇒ Object
Public: Returns a list of all existing properties.
-
#update_property(id, params = {}) ⇒ Object
Public: Update a property identified from its ID and returns extended information for it.
Instance Method Details
#create_property(params = {}) ⇒ Object
Public: Create a property and returns extended information for it.
params - The Hash used to create the resource (default: {}).
Returns Hashie The created property.
45 46 47 |
# File 'lib/lelylan/client/property.rb', line 45 def create_property(params = {}) post('/properties', params) end |
#delete_property(id) ⇒ Object
Public: Delete a property identified from its ID and returns extended information for it.
id - A String that represent the property ID.
Returns Hashie The deleted property.
68 69 70 |
# File 'lib/lelylan/client/property.rb', line 68 def delete_property(id) delete("/properties/#{id}") end |
#properties(params = {}) ⇒ Object
Public: Returns a list of owned properties.
params - The Hash used to refine the search (default: {}).
Returns Array List of properties.
23 24 25 |
# File 'lib/lelylan/client/property.rb', line 23 def properties(params = {}) get('/properties', params) end |
#property(id) ⇒ Object
Public: Returns extended information for a given property identified from its ID.
id - A String that represent the property ID.
Returns Hashie The property.
12 13 14 |
# File 'lib/lelylan/client/property.rb', line 12 def property(id) get("/properties/#{id}") end |
#public_properties(params = {}) ⇒ Object
Public: Returns a list of all existing properties.
params - The Hash used to refine the search (default: {}).
Returns Array List of types.
34 35 36 |
# File 'lib/lelylan/client/property.rb', line 34 def public_properties(params = {}) get('/properties/public', params) end |
#update_property(id, params = {}) ⇒ Object
Public: Update a property identified from its ID and returns extended information for it.
id - A String that represent the property ID. params - The Hash used to update the resource (default: {}).
Returns Hashie The updated property.
57 58 59 |
# File 'lib/lelylan/client/property.rb', line 57 def update_property(id, params = {}) put("/properties/#{id}", params) end |