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

Examples:

Complete the current route step

c = FileboundClient::Client.connect(host: url, username: 'username', password: 'password', use_ntlm: true,
                                    ntlm_user: 'ntlm_user', ntlm_password: 'ntlm_password',
                                    ntlm_domain: 'ntlm_domain')
c.routed_item_complete_step(routed_item)

Parameters:

  • routed_item_id (int)

    the routed item key to update

  • step_number (int)

    the step number to route to

  • step_caption (string)

    the step caption for the step

  • comment (string)

    optional comment for the step

  • due_date (DateTime)

    optional due date for the routed item

  • user_id (long)

    optional; if reassigning this the user id to reassign to

  • checklist_data (string)

    optional comma-seperated checklist values

  • route_step_id (long)

    optional RouteStep key

  • route_step_task_id (long)

    options RouteStepTask key

Returns:

  • (Array)

    array of RouteTask for the specified route step

Raises:



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