Sha256: 575b0fcc910e5e4b9e0d9b5fc5b574a97e139e6b924e594d4a6b70a52d97ca9a
Contents?: true
Size: 992 Bytes
Versions: 32
Compression:
Stored size: 992 Bytes
Contents
module Actions def get_action(id, options={}) options.merge!({:basic_auth => @auth}) response = self.class.get(base_api_endpoint("CRM/Actions/#{id}"), options) JSON.parse(response.body) end def get_actions(constituent_id, issue_id, options={}) options.merge!({:basic_auth => @auth}) response = self.class.get(base_api_endpoint("CRM/Actions?constituentId=#{constituent_id}&issueId=#{issue_id}"), options) JSON.parse(response.body) end def create_action(action_type, constituent_id, issue_id, notes = '', options={}) parameters = { 'ActionType': { 'Id': action_type }, 'Issue': { 'Id': issue_id }, 'Constituent': { 'Id': constituent_id }, 'Notes': notes, 'Resolved': true, } options.merge!({:basic_auth => @auth}) options.merge!(:body => parameters) response = self.class.post(base_api_endpoint('CRM/Actions'), options) JSON.parse(response.body) end end
Version data entries
32 entries across 32 versions & 1 rubygems