Class: Upwork::Api::Routers::Reports::Time
- Inherits:
-
Object
- Object
- Upwork::Api::Routers::Reports::Time
- Defined in:
- lib/upwork/api/routers/reports/time.rb
Overview
Time reports
Constant Summary collapse
- ENTRY_POINT =
'gds'
Instance Method Summary collapse
-
#get_by_agency(company, agency, params) ⇒ Object
Generating Agency Specific Reports.
-
#get_by_company(company, params) ⇒ Object
Generating Company Wide Reports.
-
#get_by_freelancer_full(freelancer_id, params) ⇒ Object
Generating Freelancer’s Specific Reports (with financial info).
-
#get_by_freelancer_limited(freelancer_id, params) ⇒ Object
Generating Freelancer’s Specific Reports (hide financial info).
-
#get_by_team_full(company, team, params) ⇒ Object
Generate Time Reports for a Specific Team (with financial info).
-
#get_by_team_limited(company, team, params) ⇒ Object
Generate Time Reports for a Specific Team (hide financial info).
-
#initialize(client) ⇒ Time
constructor
Init.
Constructor Details
#initialize(client) ⇒ Time
Init
Arguments:
client: (Client)
26 27 28 29 |
# File 'lib/upwork/api/routers/reports/time.rb', line 26 def initialize(client) @client = client @client.epoint = ENTRY_POINT end |
Instance Method Details
#get_by_agency(company, agency, params) ⇒ Object
Generating Agency Specific Reports
Arguments:
company: (String)
agency: (String)
params: (Hash)
59 60 61 62 |
# File 'lib/upwork/api/routers/reports/time.rb', line 59 def get_by_agency(company, agency, params) $LOG.i "running " + __method__.to_s get_by_type(company, nil, agency, params, false) end |
#get_by_company(company, params) ⇒ Object
Generating Company Wide Reports
Arguments:
company: (String)
params: (Hash)
69 70 71 72 |
# File 'lib/upwork/api/routers/reports/time.rb', line 69 def get_by_company(company, params) $LOG.i "running " + __method__.to_s get_by_type(company, nil, nil, params, false) end |
#get_by_freelancer_full(freelancer_id, params) ⇒ Object
Generating Freelancer’s Specific Reports (with financial info)
Arguments:
freelancer_id: (String)
params: (Hash)
89 90 91 92 |
# File 'lib/upwork/api/routers/reports/time.rb', line 89 def get_by_freelancer_full(freelancer_id, params) $LOG.i "running " + __method__.to_s @client.get '/timereports/v1/providers/' + freelancer_id, params end |
#get_by_freelancer_limited(freelancer_id, params) ⇒ Object
Generating Freelancer’s Specific Reports (hide financial info)
Arguments:
freelancer_id: (String)
params: (Hash)
79 80 81 82 |
# File 'lib/upwork/api/routers/reports/time.rb', line 79 def get_by_freelancer_limited(freelancer_id, params) $LOG.i "running " + __method__.to_s @client.get '/timereports/v1/providers/' + freelancer_id + '/hours', params end |
#get_by_team_full(company, team, params) ⇒ Object
Generate Time Reports for a Specific Team (with financial info)
Arguments:
company: (String)
team: (String)
params: (Hash)
37 38 39 40 |
# File 'lib/upwork/api/routers/reports/time.rb', line 37 def get_by_team_full(company, team, params) $LOG.i "running " + __method__.to_s get_by_type(company, team, nil, params, false) end |
#get_by_team_limited(company, team, params) ⇒ Object
Generate Time Reports for a Specific Team (hide financial info)
Arguments:
company: (String)
team: (String)
params: (Hash)
48 49 50 51 |
# File 'lib/upwork/api/routers/reports/time.rb', line 48 def get_by_team_limited(company, team, params) $LOG.i "running " + __method__.to_s get_by_type(company, team, nil, params, true) end |