Class: Upwork::Api::Routers::Reports::Finance::Earnings

Inherits:
Object
  • Object
show all
Defined in:
lib/upwork/api/routers/reports/finance/earnings.rb

Overview

Generate Earning Reports

Constant Summary collapse

ENTRY_POINT =
'gds'

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Earnings

Init

Arguments:

client: (Client)


27
28
29
30
# File 'lib/upwork/api/routers/reports/finance/earnings.rb', line 27

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

Instance Method Details

#get_by_buyers_company(buyer_company_reference, params) ⇒ Object

Generate Earning Reports for a Specific Buyer’s Company

Arguments:

buyer_company_reference: (String)
params: (Hash)


77
78
79
80
# File 'lib/upwork/api/routers/reports/finance/earnings.rb', line 77

def get_by_buyers_company(buyer_company_reference, params)
  $LOG.i "running " + __method__.to_s
  @client.get '/finreports/v2/buyer_companies/' + buyer_company_reference + '/earnings', params
end

#get_by_buyers_team(buyer_team_reference, params) ⇒ Object

Generate Earning Reports for a Specific Buyer’s Team

Arguments:

buyer_team_reference: (String)
params: (Hash)


67
68
69
70
# File 'lib/upwork/api/routers/reports/finance/earnings.rb', line 67

def get_by_buyers_team(buyer_team_reference, params)
  $LOG.i "running " + __method__.to_s
  @client.get '/finreports/v2/buyer_teams/' + buyer_team_reference + '/earnings', params
end

#get_by_freelancer(freelancer_reference, params) ⇒ Object

Generate Earning Reports for a Specific Freelancer

Arguments:

freelancer_reference: (String)
params: (Hash)


37
38
39
40
# File 'lib/upwork/api/routers/reports/finance/earnings.rb', line 37

def get_by_freelancer(freelancer_reference, params)
  $LOG.i "running " + __method__.to_s
  @client.get '/finreports/v2/providers/' + freelancer_reference + '/earnings', params
end

#get_by_freelancers_company(freelancer_company_reference, params) ⇒ Object

Generate Earning Reports for a Specific Freelancer’s Company

Arguments:

freelancer_company_reference: (String)
params: (Hash)


57
58
59
60
# File 'lib/upwork/api/routers/reports/finance/earnings.rb', line 57

def get_by_freelancers_company(freelancer_company_reference, params)
  $LOG.i "running " + __method__.to_s
  @client.get '/finreports/v2/provider_companies/' + freelancer_company_reference + '/earnings', params
end

#get_by_freelancers_team(freelancer_team_reference, params) ⇒ Object

Generate Earning Reports for a Specific Freelancer’s Team

Arguments:

freelancer_team_reference: (String)
params: (Hash)


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

def get_by_freelancers_team(freelancer_team_reference, params)
  $LOG.i "running " + __method__.to_s
  @client.get '/finreports/v2/provider_teams/' + freelancer_team_reference + '/earnings', params
end