Sha256: 1ac27173f598762338030fec078ab28153b5095409ca111493abb8bf6fd611cd
Contents?: true
Size: 783 Bytes
Versions: 12
Compression:
Stored size: 783 Bytes
Contents
module Issues def create_issue(activity_type, category_id, constituent_id, contact_type, notes, origin_id, options = {}) parameters = { 'ActivityType': { 'Id': activity_type, 'Category': { 'Id': category_id, }, }, 'ContactType': { 'Id': contact_type, }, 'Constituent': { 'Id': constituent_id, }, 'Origin': { 'Id': origin_id, }, 'Notes': notes, } parameters.delete(:Origin) unless origin_id.present? options.merge!(basic_auth: @auth, headers: @headers) options.merge!(:body => parameters.to_json) response = self.class.post(base_api_endpoint('CRM/Issues'), options) JSON.parse(response.body) end end
Version data entries
12 entries across 12 versions & 1 rubygems