Class: Trogdir::V1::PersonEntity

Inherits:
Grape::Entity
  • Object
show all
Defined in:
lib/trogdir/versions/v1/entities/person.rb

Constant Summary collapse

FIELDS =
[
  :uuid,

  # Names
  :first_name,
  :preferred_name,
  :middle_name,
  :last_name,
  :display_name,

  # Demographic
  :gender,
  :partial_ssn,
  :birth_date,

  # Groups and permissions
  :entitlements,
  :affiliations,
  :groups,

  # Options
  :enabled,

  # STUDENT INFO #

  # On-Campus Residence
  :residence,
  :floor,
  :wing,
  :mailbox,

  # Academic
  :majors,
  :minors,

  # FERPA
  :privacy,

  # EMPLOYEE INFO #
  :department,
  :title,
  :employee_type,
  :full_time,
  :pay_type,
  :job_ct,

  ids: [
    :id,
    :type,
    :identifier
  ],

  emails: [
    :id,
    :type,
    :address,
    :primary
  ],

  photos: [
    :id,
    :type,
    :url,
    :height,
    :width
  ],

  phones: [
    :id,
    :type,
    :number,
    :primary
  ],

  addresses: [
    :id,
    :type,
    :street_1,
    :street_2,
    :city,
    :state,
    :zip,
    :country
  ]
]

Instance Method Summary collapse

Instance Method Details

#serializable_hash(runtime_options = {}) ⇒ Object



90
91
92
# File 'lib/trogdir/versions/v1/entities/person.rb', line 90

def serializable_hash(runtime_options = {})
  build_hash(object, FIELDS)
end