lib/ecoportal/api/v1/person.rb in ecoportal-api-0.9.6 vs lib/ecoportal/api/v1/person.rb in ecoportal-api-0.9.7

- old
+ new

@@ -4,15 +4,14 @@ # @attr id [String] the internal unique id of this person (unique in all the system). # @attr external_id [String] the alternative unique id of this person (unique in one organization). # @attr name [String] the name of the person. # @attr supervisor_id [String] internal or external id of the supervisor of this person. # @attr contractor_organization_id [String] internal id of the contractor entity of this person. - # @attr_reader subordinates [Integer] the number of people this person is supervisor of. # @attr details [PersonDetails, nil] the details of the person or `nil` if missing. class Person < Common::BaseModel passthrough :id, :external_id, :name, :email, :filter_tags - passthrough :supervisor_id, :subordinates, :contractor_organization_id + passthrough :supervisor_id, :contractor_organization_id passthrough :freemium class_resolver :person_schema_class, "Ecoportal::API::V1::PersonSchema" class_resolver :person_details_class, "Ecoportal::API::V1::PersonDetails" embeds_one :details, nullable: true, klass: :person_details_class @@ -79,10 +78,10 @@ def as_json super.merge "details" => details&.as_json end def as_update(ref = :last, ignore: []) - super(ref, ignore: ignore | ["subordinates"]) + super(ref, ignore: ignore) end # Sets the PersonDetails to the person, depending on the paramter received: # - `nil`: blanks the details. # - `PersonDetails`: sets a copy of the object param as details.