class Upwork::Api::Routers::Hr::Contracts

Contracts API

Constants

ENTRY_POINT

Public Class Methods

new(client) click to toggle source

Init

Arguments:

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

Public Instance Methods

end_contract(reference, params) click to toggle source

End Contract

Arguments:

reference: (String)
params: (Hash)
# File lib/upwork/api/routers/hr/contracts.rb, line 56
def end_contract(reference, params)
  $LOG.i "running " + __method__.to_s
  @client.delete '/hr/v2/contracts/' + reference, params
end
restart_contract(reference, params) click to toggle source

Restart Contract

Arguments:

reference: (String)
params: (Hash)
# File lib/upwork/api/routers/hr/contracts.rb, line 46
def restart_contract(reference, params)
  $LOG.i "running " + __method__.to_s
  @client.put '/hr/v2/contracts/' + reference + '/restart', params
end
suspend_contract(reference, params) click to toggle source

Suspend Contract

Arguments:

reference: (String)
params: (Hash)
# File lib/upwork/api/routers/hr/contracts.rb, line 36
def suspend_contract(reference, params)
  $LOG.i "running " + __method__.to_s
  @client.put '/hr/v2/contracts/' + reference + '/suspend', params
end