class FrilansFinansAPI::FixtureClient

Constants

BASE_PATH

NOTE: If this is extracted out of just_match_api, this will need to change

FIXTURE_URI
HTTP_STATUS
Request
Response

Public Instance Methods

create_company(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 52
def create_company(**_args)
  mock_response(read(:company))
end
create_employment_certificate(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 56
def create_employment_certificate(**_args)
  mock_response('{}')
end
create_invoice(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 60
def create_invoice(**_args)
  mock_response(read(:invoice))
end
create_user(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 48
def create_user(**_args)
  mock_response(read(:user))
end
currencies(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 16
def currencies(**_args)
  mock_response(read(:currencies))
end
invoice(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 44
def invoice(**_args)
  mock_response(read(:invoice))
end
profession(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 40
def profession(**_args)
  mock_response(read(:profession))
end
professions(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 20
def professions(**_args)
  mock_response(read(:professions))
end
read(type) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 72
def read(type)
  File.read("#{BASE_PATH}/#{type}_fixture.json")
end
salaries(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 28
def salaries(**_args)
  mock_response(read(:salaries))
end
taxes(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 32
def taxes(**_args)
  mock_response(read(:taxes))
end
update_invoice(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 64
def update_invoice(**_args)
  mock_response(read(:invoice))
end
update_user(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 68
def update_user(**_args)
  mock_response(read(:user))
end
user(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 36
def user(**_args)
  mock_response(read(:user))
end
users(**_args) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 24
def users(**_args)
  mock_response(read(:users))
end

Private Instance Methods

mock_response(body) click to toggle source
# File lib/frilans_finans_api/client/fixture_client.rb, line 78
def mock_response(body)
  request = Request.new(FIXTURE_URI)
  Response.new(HTTP_STATUS, body, request)
end