Method: FileboundClient::Endpoints::RoutedItems#routed_item_complete_step
- Defined in:
- lib/filebound_client/endpoints/routed_items.rb
#routed_item_complete_step(routed_item_id, step_number:, step_caption:, comment:, due_date:, user_id:, checklist_data:, route_step_id:, route_step_task_id:) ⇒ Array
Completes the current step for the routed item. The routed_item.id must be not nil and > 0. rubocop:disable Metrics/CyclomaticComplexity, Metrics/ParameterLists, Metrics/PerceivedComplexity
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/filebound_client/endpoints/routed_items.rb', line 50 def routed_item_complete_step(routed_item_id, step_number:, step_caption:, comment:, due_date:, user_id:, checklist_data:, route_step_id:, route_step_task_id:) raise Client::FileboundClientException.new('Id is required', 0) unless routed_item_id.greater_than_zero? params = {} params[:stepNumber] = step_number if step_number params[:stepCaption] = step_caption if step_caption params[:comment] = comment if comment params[:dueDate] = due_date if due_date params[:userId] = user_id if user_id params[:checklistData] = checklist_data if checklist_data params[:routeStepId] = route_step_id if route_step_id params[:routeStepTaskId] = route_step_task_id if route_step_task_id put("/routeditems/#{routed_item_id}/complete", params, nil) end |