Class: FinchAPI::Resources::HRIS::Documents
- Inherits:
-
Object
- Object
- FinchAPI::Resources::HRIS::Documents
- Defined in:
- lib/finch-api/resources/hris/documents.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Documents
constructor
A new instance of Documents.
-
#list(params = {}) ⇒ FinchAPI::Models::HRIS::DocumentListResponse
Beta: This endpoint is in beta and may change.
-
#retreive(document_id, params = {}) ⇒ FinchAPI::Models::HRIS::W42020, FinchAPI::Models::HRIS::W42005
Beta: This endpoint is in beta and may change.
Constructor Details
#initialize(client:) ⇒ Documents
Returns a new instance of Documents.
56 57 58 |
# File 'lib/finch-api/resources/hris/documents.rb', line 56 def initialize(client:) @client = client end |
Instance Method Details
#list(params = {}) ⇒ FinchAPI::Models::HRIS::DocumentListResponse
Beta: This endpoint is in beta and may change. Retrieve a list of
company-wide documents.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/finch-api/resources/hris/documents.rb', line 25 def list(params = {}) parsed, = FinchAPI::Models::HRIS::DocumentListParams.dump_request(params) @client.request( method: :get, path: "employer/documents", query: parsed, model: FinchAPI::Models::HRIS::DocumentListResponse, options: ) end |
#retreive(document_id, params = {}) ⇒ FinchAPI::Models::HRIS::W42020, FinchAPI::Models::HRIS::W42005
Beta: This endpoint is in beta and may change. Retrieve details of a
specific document by its ID.
46 47 48 49 50 51 52 53 |
# File 'lib/finch-api/resources/hris/documents.rb', line 46 def retreive(document_id, params = {}) @client.request( method: :get, path: ["employer/documents/%0s", document_id], model: FinchAPI::Models::HRIS::DocumentRetreiveResponse, options: params[:request_options] ) end |