Class: V1::SubjectSerializer

Inherits:
ActiveModel::Serializer
  • Object
show all
Defined in:
api/app/serializers/v1/subject_serializer.rb

Overview

Provides a more detailed view of a subject than the list view, providing progress on their account and some other useful information

 {
   "response": {
     "code": "1",
     "company_id": 1,
     "email": "daniel@redjade.net",
     "name": "Daniel Harvey",
     "phone": "",
     "id": 1,
     "first_name": "Daniel",
     "last_name": "Harvey",
     "middle_initial": null,
     "demographic_ids": [
       2,
       173
     ],
     "archived_at": null,
     "household_id": 26,
     "head_of_household": true,
     "date_of_birth": "1986-03-01",
     "medium_profile_picture": "//cdn.redjade.net/images/medium/missing.png",
     "thumb_profile_picture": "//cdn.redjade.net/images/thumb/missing.png",
     "preferred_language": "es_ES",
     "work_phone": null,
     "mobile_phone": null,
     "notes": null,
     "has_login_account": true,
     "onboarding_completed_at": "2019-05-13T20:39:38.050Z",
     "created_at": "2019-04-24T18:38:17.092Z",
     "updated_at": "2019-10-31T23:39:57.965Z",
     "interests_selected_at": null,
     "company_interests_updated_at": null,
     "is_minor": false,
     "preferred_language_simple": "es",
     "deleted_at": null,
     "clearance_levels": [
       "view_consent_agreement",
       "subject_consent",
       "participate_in_campaign",
       "view_sensory_test_meta",
       "schedule_subjects",
       "view_reservations",
       "manage_recruiting_blast_opt_outs",
       "in_progress_check_onboarding_configuration",
       "questionnaire_submit_onboarding_configuration",
       "portal_access"
     ],
     "interaction_rating": "4.5",
     "engagement_rating": "4.516129032258064",
     "progress": {
       "has_login_account": true,
       "restricted": null,
       "prioritize_screening": "",
       "consent": "valid",
       "profile": "valid",
       "anonymous": false,
       "interests": "valid",
       "interest_selection_necessary": false,
       "onboarding": "valid",
       "minor_entry": "invalid"
     },
     "current_subject_consent_response_id": 1,
     "consented": true,
     "can_call": true,
     "can_email": true,
     "contact_exclusion_until_date": null,
     "portal_access": true,
     "email_status": "confirmed",
     "impersonator": null,
     "cid": null,
     "portal_style": "default",
     "locations": []
   }
 }

Instance Method Summary collapse

Instance Method Details

#company_interests_updated_atObject

#date_of_birthObject

#demographic_idsObject

#medium_profile_pictureObject

#portal_styleObject

#preferred_language_simpleObject

#thumb_profile_pictureObject