Class: ONEAccess::API::Research

Inherits:
Base
  • Object
show all
Defined in:
lib/oneaccess/api/research.rb

Class Method Summary collapse

Methods inherited from Base

api_url, resource_api_path, send_get, send_post

Class Method Details

.document(document_id:, first_name:, last_name:, email:) ⇒ Object



9
10
11
12
13
# File 'lib/oneaccess/api/research.rb', line 9

def self.document(document_id:, first_name:, last_name:, email:)
  resp = send_get("document", documentId: document_id, userFirstName: first_name,
    userLastName: last_name, userEmail: email)
  Response::ResearchDocumentResponse.from_json(resp.body)
end

.document_by_user_id(document_id:, user_id:) ⇒ Object



15
16
17
18
# File 'lib/oneaccess/api/research.rb', line 15

def self.document_by_user_id(document_id:, user_id:)
  resp = send_get("documentByUserId", documentId: document_id, userId: user_id)
  Response::ResearchDocumentResponse.from_json(resp.body)
end