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
private
A new instance of Documents.
-
#list(entity_ids: nil, individual_ids: nil, limit: nil, offset: nil, types: nil, request_options: {}) ⇒ FinchAPI::Models::HRIS::DocumentListResponse
Some parameter documentations has been truncated, see Models::HRIS::DocumentListParams for more details.
-
#retreive(document_id, entity_ids: nil, request_options: {}) ⇒ FinchAPI::Models::HRIS::W42020, FinchAPI::Models::HRIS::W42005
Beta: This endpoint is in beta and may change.
Constructor Details
#initialize(client:) ⇒ Documents
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Documents.
69 70 71 |
# File 'lib/finch_api/resources/hris/documents.rb', line 69 def initialize(client:) @client = client end |
Instance Method Details
#list(entity_ids: nil, individual_ids: nil, limit: nil, offset: nil, types: nil, request_options: {}) ⇒ FinchAPI::Models::HRIS::DocumentListResponse
Some parameter documentations has been truncated, see Models::HRIS::DocumentListParams for more details.
Beta: This endpoint is in beta and may change. Retrieve a list of company-wide documents.
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/finch_api/resources/hris/documents.rb', line 30 def list(params = {}) parsed, = FinchAPI::HRIS::DocumentListParams.dump_request(params) @client.request( method: :get, path: "employer/documents", query: parsed, model: FinchAPI::Models::HRIS::DocumentListResponse, options: ) end |
#retreive(document_id, entity_ids: nil, request_options: {}) ⇒ 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.
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/finch_api/resources/hris/documents.rb', line 55 def retreive(document_id, params = {}) parsed, = FinchAPI::HRIS::DocumentRetreiveParams.dump_request(params) @client.request( method: :get, path: ["employer/documents/%1$s", document_id], query: parsed, model: FinchAPI::Models::HRIS::DocumentRetreiveResponse, options: ) end |