class Upwork::Api::Routers::Organization::Companies

Companies inside Organization

Constants

ENTRY_POINT

Public Class Methods

new(client) click to toggle source

Init

Arguments:

client: (Client)
# File lib/upwork/api/routers/organization/companies.rb, line 26
def initialize(client)
  @client = client
  @client.epoint = ENTRY_POINT
end

Public Instance Methods

get_list() click to toggle source

Get Companies Info

# File lib/upwork/api/routers/organization/companies.rb, line 32
def get_list
  $LOG.i "running " + __method__.to_s
  @client.get '/hr/v2/companies'
end
get_specific(company_reference) click to toggle source

Get Specific Company

Arguments:

company_reference: (String)
# File lib/upwork/api/routers/organization/companies.rb, line 41
def get_specific(company_reference)
  $LOG.i "running " + __method__.to_s
  @client.get '/hr/v2/companies/' + company_reference
end
get_teams(company_reference) click to toggle source

Get Teams in Company

Arguments:

company_reference: (String)
# File lib/upwork/api/routers/organization/companies.rb, line 50
def get_teams(company_reference)
  $LOG.i "running " + __method__.to_s
  @client.get '/hr/v2/companies/' + company_reference + '/teams'
end
get_users(company_reference) click to toggle source

Get Users in Company

Arguments:

company_reference: (String)
# File lib/upwork/api/routers/organization/companies.rb, line 59
def get_users(company_reference)
  $LOG.i "running " + __method__.to_s
  @client.get '/hr/v2/companies/' + company_reference + '/users'
end