Class: Harvesting::Models::User

Inherits:
HarvestRecord show all
Defined in:
lib/harvesting/models/user.rb

Overview

An user record from your Harvest account.

For more information: help.getharvest.com/api-v2/users-api/users/users/

Instance Attribute Summary

Attributes inherited from Base

#attributes, #harvest_client

Instance Method Summary collapse

Methods inherited from HarvestRecord

#create, #save, #update

Methods inherited from Base

#create, #delete, #fetch, get, #initialize, #save, #to_hash, #update

Constructor Details

This class inherits a constructor from Harvesting::Models::Base

Instance Method Details

#nameObject



34
35
36
# File 'lib/harvesting/models/user.rb', line 34

def name
  @attributes['name'].nil? ? "#{first_name} #{last_name}" : @attributes['name']
end

#pathObject



30
31
32
# File 'lib/harvesting/models/user.rb', line 30

def path
  @attributes['id'].nil? ? "users" : "users/#{@attributes['id']}"
end