Class: Ecoportal::API::V1::Person

Inherits:
Object
  • Object
show all
Defined in:
lib/eco/api/common/version_patches/ecoportal_api/external_person.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#entryEco::API::Common::People::PersonEntry, Hash

the input entry plain hash data used to update/create this person.

Returns:



5
6
7
# File 'lib/eco/api/common/version_patches/ecoportal_api/external_person.rb', line 5

def entry
  @entry
end

Instance Method Details

#identify(section = :person) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/eco/api/common/version_patches/ecoportal_api/external_person.rb', line 8

def identify(section = :person)
  if entry && section == :entry
    entry.to_s(:identify)
  else
    str_id = id ? "id: '#{id}'; " : ""
    "'#{name}' (#{str_id}ext_id: '#{external_id}'; email: '#{email}')"
  end
end