Class: CaseblocksAPI::UpdateCase
- Inherits:
-
Object
- Object
- CaseblocksAPI::UpdateCase
- Defined in:
- lib/caseblocks_api/update_case.rb
Instance Method Summary collapse
- #execute(case_type, id, params) ⇒ Object
-
#initialize(client) ⇒ UpdateCase
constructor
A new instance of UpdateCase.
Constructor Details
#initialize(client) ⇒ UpdateCase
Returns a new instance of UpdateCase.
6 7 8 |
# File 'lib/caseblocks_api/update_case.rb', line 6 def initialize(client) @client = client end |
Instance Method Details
#execute(case_type, id, params) ⇒ Object
10 11 12 13 14 |
# File 'lib/caseblocks_api/update_case.rb', line 10 def execute(case_type, id, params) case_type_name = case_type.singularize url = "/case_blocks/#{case_type_name}/#{id}" @client.put(url, {:body => {case_type_name => params}.to_json}) end |