Skip to content

Instantly share code, notes, and snippets.

@ckuwanoe
Created September 29, 2018 00:19
Show Gist options
  • Save ckuwanoe/9ab171faea875db0e0347cdc55c1086d to your computer and use it in GitHub Desktop.
Save ckuwanoe/9ab171faea875db0e0347cdc55c1086d to your computer and use it in GitHub Desktop.
Rejected batch
[3] pry(main)> batch_res = client.read_batch(2582427)
=> {"content_created"=>nil,
"children_ids"=>[2591014],
"reject_reasons"=>[],
"is_digitized"=>false,
"related_job_id"=>nil,
"created_with"=>"auto",
=> {"content_created"=>nil,
"children_ids"=>[2591014],
"reject_reasons"=>[],
"is_digitized"=>false,
"related_job_id"=>nil,
"created_with"=>"auto",
"id"=>2582427,
"documents"=>
[{"has_tables"=>false,
"page_count"=>1,
"is_versioned"=>false,
"default_impossible_value"=>"--impossible--",
"id"=>200974,
"has_fields"=>true,
"read_only"=>true,
"user_id"=>17825,
"safe_editable"=>false,
"extra_pages_settings"=>"none",
"user_visible"=>true,
"default_blank_value"=>"--blank--",
"sheet_count"=>1,
"conversion_status"=>"completed",
"sheets"=>
[{"version_number"=>0,
"name"=>"e983da22-3e18-40f5-b7a6-ce8b07fb8bfa-page1.PDF",
[4] pry(main)> child_batch_res = client.read_batch(batch_res.fetch("children_ids").first)
=> {"content_created"=>nil,
"children_ids"=>[],
"reject_reasons"=>["could_not_sort"],
"is_digitized"=>false,
"related_job_id"=>nil,
"created_with"=>"auto",
"id"=>2591014,
"documents"=>[],
"user_id"=>17825,
"last_emailed_by"=>"",
"created_by"=>"Drew Tappan",
"parent_id"=>2582427,
"templates"=>[],
"is_sorting_only"=>true,
"status"=>"rejected",
"is_reject_batch"=>true,
"emailed_by"=>"",
"sorting_enabled"=>false,
"last_uploader"=>"Drew Tappan",
"job_ids"=>[],
"last_upload_date"=>"2018-09-26T10:49:49.468",
"name"=>
"svco - NEC_DENVER_UMSDay1Main_MRoyal_20180727_redacted.pdf - Rejected - Rejected",
"created"=>"2018-09-26T10:49:49.312",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment