Class: ONEAccess::API::V1_1::Research

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

Class Method Summary collapse

Methods inherited from ApiBase

api_url, resource_api_path, send_get, send_post

Class Method Details

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



11
12
13
14
15
# File 'lib/oneaccess/api/v1_1/research.rb', line 11

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



17
18
19
20
# File 'lib/oneaccess/api/v1_1/research.rb', line 17

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