Sha256: 5872bbd9a39129d4210a7c10347e9774754ce34ee0e20edf42ce3db1634c7f45
Contents?: true
Size: 1.01 KB
Versions: 75
Compression:
Stored size: 1.01 KB
Contents
module Actions def get_action(id, options={}) options.merge!(basic_auth: @auth, headers: @headers) 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, headers: @headers) 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, headers: @headers) options.merge!(:body => parameters) response = self.class.post(base_api_endpoint('CRM/Actions'), options) JSON.parse(response.body) end end
Version data entries
75 entries across 75 versions & 1 rubygems