lib/harvesting/models/user.rb in harvesting-0.3.0 vs lib/harvesting/models/user.rb in harvesting-0.4.0

- old
+ new

@@ -1,9 +1,13 @@ module Harvesting module Models + # An user record from your Harvest account. + # + # For more information: https://help.getharvest.com/api-v2/users-api/users/users/ class User < HarvestRecord attributed :id, + :name, :first_name, :last_name, :email, :telephone, :timezone, @@ -23,9 +27,13 @@ :created_at, :updated_at def path @attributes['id'].nil? ? "users" : "users/#{@attributes['id']}" + end + + def name + @attributes['name'].nil? ? "#{first_name} #{last_name}" : @attributes['name'] end end end end