Class: Upwork::Api::Routers::Hr::Roles
- Inherits:
-
Object
- Object
- Upwork::Api::Routers::Hr::Roles
- Defined in:
- lib/upwork/api/routers/hr/roles.rb
Overview
Roles
Constant Summary collapse
- ENTRY_POINT =
'api'
Instance Method Summary collapse
-
#get_all ⇒ Object
Get user roles.
-
#get_by_specific_user(user_reference) ⇒ Object
Get by specific user.
-
#initialize(client) ⇒ Roles
constructor
Init.
Constructor Details
#initialize(client) ⇒ Roles
Init
Arguments:
client: (Client)
26 27 28 29 |
# File 'lib/upwork/api/routers/hr/roles.rb', line 26 def initialize(client) @client = client @client.epoint = ENTRY_POINT end |
Instance Method Details
#get_all ⇒ Object
Get user roles
32 33 34 35 |
# File 'lib/upwork/api/routers/hr/roles.rb', line 32 def get_all $LOG.i "running " + __method__.to_s @client.get '/hr/v2/userroles' end |
#get_by_specific_user(user_reference) ⇒ Object
Get by specific user
Arguments:
reference: (String)
41 42 43 44 |
# File 'lib/upwork/api/routers/hr/roles.rb', line 41 def get_by_specific_user(user_reference) $LOG.i "running " + __method__.to_s @client.get '/hr/v2/userroles/' + user_reference end |