# frozen_string_literal: true

class OmbCxReportingCollectionSerializer < ActiveModel::Serializer
  attributes :id,
             :organization_id,
             :organization_name,
             :organization_abbreviation,
             :service_provider_id,
             :service_provider_name,
             :collection_id,
             :collection_name,
             :collection_year,
             :collection_quarter,
             :service_provided,
             :transaction_point,
             :channel,
             :volume_of_customers,
             :volume_of_customers_provided_survey_opportunity,
             :volume_of_respondents,
             :omb_control_number,
             :federal_register_url,
             :q1_text,
             :q1_1,
             :q1_2,
             :q1_3,
             :q1_4,
             :q1_5,
             :q1_point_scale,
             :q2_text,
             :q2_1,
             :q2_2,
             :q2_3,
             :q2_4,
             :q2_5,
             :q2_point_scale,
             :q3_text,
             :q3_1,
             :q3_2,
             :q3_3,
             :q3_4,
             :q3_5,
             :q3_point_scale,
             :q4_text,
             :q4_1,
             :q4_2,
             :q4_3,
             :q4_4,
             :q4_5,
             :q4_point_scale,
             :q5_text,
             :q5_1,
             :q5_2,
             :q5_3,
             :q5_4,
             :q5_5,
             :q5_point_scale,
             :q6_text,
             :q6_1,
             :q6_2,
             :q6_3,
             :q6_4,
             :q6_5,
             :q6_point_scale,
             :q7_text,
             :q7_1,
             :q7_2,
             :q7_3,
             :q7_4,
             :q7_5,
             :q7_point_scale,
             :q8_text,
             :q8_1,
             :q8_2,
             :q8_3,
             :q8_4,
             :q8_5,
             :q8_point_scale,
             :q9_text,
             :q9_1,
             :q9_2,
             :q9_3,
             :q9_4,
             :q9_5,
             :q9_point_scale,
             :q10_text,
             :q10_1,
             :q10_2,
             :q10_3,
             :q10_4,
             :q10_5,
             :q10_point_scale,
             :q11_text,
             :q11_1,
             :q11_2,
             :q11_3,
             :q11_4,
             :q11_5,
             :q11_point_scale,
             :created_at,
             :updated_at,
             :operational_metrics,
             :service_id,
             :service_name,
             :service_slug

  def service_provider_id
    object.collection.service_provider_id
  end

  def service_provider_name
    object.collection.service_provider&.name
  end
end
