Sha256: 4b9e3456b743c716514b8663505ecafbd13cf8ae65d7f7bd3f683108d0984737

Contents?: true

Size: 796 Bytes

Versions: 7

Compression:

Stored size: 796 Bytes

Contents

# frozen_string_literal: true
require_relative "../../response/research_document_response"

module ONEAccess
  module API
    module V1_1 # rubocop:disable Style/ClassAndModuleCamelCase
      class Research < Base
        api_path "/research"

        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

        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
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
oneaccess-0.4.4 lib/oneaccess/api/v1_1/research.rb
oneaccess-0.4.3 lib/oneaccess/api/v1_1/research.rb
oneaccess-0.4.2 lib/oneaccess/api/v1_1/research.rb
oneaccess-0.4.1 lib/oneaccess/api/v1_1/research.rb
oneaccess-0.4.0 lib/oneaccess/api/v1_1/research.rb
oneaccess-0.3.0 lib/oneaccess/api/v1_1/research.rb
oneaccess-0.2.0 lib/oneaccess/api/v1_1/research.rb