module Medlink class User < Base attribute :id, Integer attribute :first_name, String attribute :last_name, String attribute :ecn_year, Integer attribute :ecn_ranking, Integer attribute :internat_end_year, Integer attribute :birthdate, Date attribute :speciality, Medlink::Speciality attribute :city, Medlink::City attribute :profession, Medlink::Profession attribute :institutions, [Medlink::Institution] def self.search(params = {}) json = client.post("#{path}/search", params) users = [] json.each do |element| users << new(element) end users end private def path "users" end def self.path "users" end end end