Class: Upwork::Api::Routers::Workdays

Inherits:
Object
  • Object
show all
Defined in:
lib/upwork/api/routers/workdays.rb

Overview

Workdays

Constant Summary collapse

ENTRY_POINT =
'api'

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Workdays

Init

Arguments:

client: (Client)


25
26
27
28
# File 'lib/upwork/api/routers/workdays.rb', line 25

def initialize(client)
  @client = client
  @client.epoint = ENTRY_POINT 
end

Instance Method Details

#get_by_company(company, from_date, till_date, params = {}) ⇒ Object

Get Workdays by Company Arguments:

company: (String)
from_date: (String)
till_date: (String)
params: (Hash)


36
37
38
39
# File 'lib/upwork/api/routers/workdays.rb', line 36

def get_by_company(company, from_date, till_date, params = {})
  $LOG.i "running " + __method__.to_s
  @client.get '/team/v3/workdays/companies/' + company + '/' + from_date + ',' + till_date, params
end

#get_by_contract(contract, from_date, till_date, params = {}) ⇒ Object

Get Workdays by Contract Arguments:

contract: (String)
from_date: (String)
till_date: (String)
params: (Hash)


47
48
49
50
# File 'lib/upwork/api/routers/workdays.rb', line 47

def get_by_contract(contract, from_date, till_date, params = {})
  $LOG.i "running " + __method__.to_s
  @client.get '/team/v3/workdays/contracts/' + contract + '/' + from_date + ',' + till_date, params
end