Module: WCC::Data::Mapper::RESTQuery
- Included in:
- WCC::Data::Model
- Defined in:
- lib/wcc/data/mapper/rest_query.rb
Instance Method Summary collapse
Instance Method Details
#create(attributes = {}) ⇒ Object
15 16 17 18 |
# File 'lib/wcc/data/mapper/rest_query.rb', line 15 def create(attributes={}) ensure_endpoint_defined new_from_response(endpoint.create(attributes)) end |
#find(id) ⇒ Object
5 6 7 8 |
# File 'lib/wcc/data/mapper/rest_query.rb', line 5 def find(id) ensure_endpoint_defined new_from_response(endpoint.show(id)) end |
#list(params = {}) ⇒ Object
10 11 12 13 |
# File 'lib/wcc/data/mapper/rest_query.rb', line 10 def list(params={}) ensure_endpoint_defined new_from_response(endpoint.index(params: params)) end |