class Harvest::BasicAuthCredentials
Public Class Methods
new(access_token: nil, account_id: nil)
click to toggle source
# File lib/harvest/credentials.rb, line 3 def initialize(access_token: nil, account_id: nil) @access_token = access_token @account_id = account_id end
Public Instance Methods
host()
click to toggle source
# File lib/harvest/credentials.rb, line 14 def host 'https://api.harvestapp.com/v2' end
set_authentication(request_options)
click to toggle source
# File lib/harvest/credentials.rb, line 8 def set_authentication(request_options) request_options[:headers] ||= {} request_options[:headers]['Authorization'] = "Bearer #{@access_token}" request_options[:headers]['Harvest-Account-ID'] = @account_id end