Module: Actions
- Included in:
- TessituraRest
- Defined in:
- lib/tessitura_rest/crm/actions.rb
Instance Method Summary collapse
- #create_action(action_type, constituent_id, issue_id, notes = '', options = {}) ⇒ Object
- #get_action(id, options = {}) ⇒ Object
- #get_actions(constituent_id, issue_id, options = {}) ⇒ Object
Instance Method Details
#create_action(action_type, constituent_id, issue_id, notes = '', options = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/tessitura_rest/crm/actions.rb', line 15 def create_action(action_type, constituent_id, issue_id, notes = '', ={}) parameters = { 'ActionType': { 'Id': action_type }, 'Issue': { 'Id': issue_id }, 'Constituent': { 'Id': constituent_id }, 'Notes': notes, 'Resolved': true, } .merge!(basic_auth: @auth, headers: @headers) .merge!(:body => parameters) response = self.class.post(base_api_endpoint('CRM/Actions'), ) JSON.parse(response.body) end |
#get_action(id, options = {}) ⇒ Object
3 4 5 6 7 |
# File 'lib/tessitura_rest/crm/actions.rb', line 3 def get_action(id, ={}) .merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("CRM/Actions/#{id}"), ) JSON.parse(response.body) end |
#get_actions(constituent_id, issue_id, options = {}) ⇒ Object
9 10 11 12 13 |
# File 'lib/tessitura_rest/crm/actions.rb', line 9 def get_actions(constituent_id, issue_id, ={}) .merge!(basic_auth: @auth, headers: @headers) response = self.class.get(base_api_endpoint("CRM/Actions?constituentId=#{constituent_id}&issueId=#{issue_id}"), ) JSON.parse(response.body) end |