Class: Operto::StaffTaskTimes::Index
- Inherits:
-
Object
- Object
- Operto::StaffTaskTimes::Index
- Includes:
- FilteredPagination, Operation
- Defined in:
- lib/operto/staff_task_times/index.rb,
sig/operto.rbs
Constant Summary collapse
- FILTER_MAPPINGS =
{ task_id: 'TaskID', staff_id: 'StaffID', property_id: 'PropertyID', start_date: 'StartDate', end_date: 'EndDate' }.freeze
- DATE_KEYS =
%i[start_date end_date].freeze
- DEFAULT_SORT =
'StaffTaskTimeID desc'.freeze
Instance Method Summary collapse
Methods included from Operation
Instance Method Details
#call(attributes: {}, skip: 0, take: 50) ⇒ ::Dry::Monads::Result[::Hash[::Symbol, untyped]]
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/operto/staff_task_times/index.rb', line 19 def call(attributes: {}, skip: 0, take: 50) validate_arguments!(attributes) query_params = build_query_params(attributes, skip, take) response = Operto::Client.connection.get('stafftasktimes', query_params) Operto::Client.handle_response(response) { |body| format_results(body) } rescue StandardError => e Failure(e) end |