Module: Hawkei::APIOperation::Save::ClassMethods
- Defined in:
- lib/hawkei/api_operation/save.rb
Instance Method Summary collapse
-
#create(params = {}, options = {}) ⇒ Hawkei::Object
Create an API Resource and validate the params for the API.
-
#update(id, params = {}, options = {}) ⇒ Hawkei::Object
Update an API Resource and validate params for the API.
Instance Method Details
#create(params = {}, options = {}) ⇒ Hawkei::Object
Create an API Resource and validate the params for the API.
15 16 17 18 |
# File 'lib/hawkei/api_operation/save.rb', line 15 def create(params = {}, = {}) response = request(:post, resource_path, params, ) initialize_from(response) end |
#update(id, params = {}, options = {}) ⇒ Hawkei::Object
Update an API Resource and validate params for the API
28 29 30 31 |
# File 'lib/hawkei/api_operation/save.rb', line 28 def update(id, params = {}, = {}) response = request(:put, "#{resource_path}/#{id}", params, ) initialize_from(response) end |