class Dovico::Employee
Constants
- URL_PATH
Public Class Methods
myself()
click to toggle source
# File lib/dovico/model/employee.rb, line 21 def self.myself employees = ApiClient.get("#{URL_PATH}/Me") parse(employees["Employees"].first) end
parse(hash)
click to toggle source
# File lib/dovico/model/employee.rb, line 13 def self.parse(hash) Employee.new( id: hash["ID"], first_name: hash["FirstName"], last_name: hash["LastName"], ) end
Public Instance Methods
to_s()
click to toggle source
# File lib/dovico/model/employee.rb, line 27 def to_s %{ - ID: #{id} - First Name: #{first_name} - Last Name: #{last_name}} end