module Ecoportal module API class V1 class PersonDetails # Checks if an `id` or `alt_id` exists # @param id [String] the `id` or the `alt_id` of the target field. # @return [Boolean] `true` if it exists, `false` otherwise def key?(id) @fields_by_id or index_fields @fields_by_id.key?(id) || @fields_by_alt_id.key?(id) end end end end end