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

Version Path
tessitura_rest-2.0.7 lib/tessitura_rest/crm/issues.rb
tessitura_rest-2.0.6 lib/tessitura_rest/crm/issues.rb
tessitura_rest-2.0.5 lib/tessitura_rest/crm/issues.rb
tessitura_rest-2.0.4 lib/tessitura_rest/crm/issues.rb
tessitura_rest-2.0.3 lib/tessitura_rest/crm/issues.rb
tessitura_rest-2.0.2 lib/tessitura_rest/crm/issues.rb
tessitura_rest-2.0.1 lib/tessitura_rest/crm/issues.rb
tessitura_rest-1.5.3.1 lib/tessitura_rest/crm/issues.rb
tessitura_rest-1.5.3 lib/tessitura_rest/crm/issues.rb
tessitura_rest-1.5.2 lib/tessitura_rest/crm/issues.rb
tessitura_rest-2.0.0 lib/tessitura_rest/crm/issues.rb
tessitura_rest-1.5.1 lib/tessitura_rest/crm/issues.rb