@@ -27,10 +27,12 @@ def initialize(workflow_id, api_key: '')
2727 # @param document_alias [String, nil] Alias to give to the document.
2828 # @param priority [Symbol, nil] Priority to give to the document.
2929 # @param full_text [Boolean] Whether to include the full OCR text response in compatible APIs.
30+ # @param public_url [String, nil] A unique, encrypted URL for accessing the document validation interface without
31+ # requiring authentication.
3032 # @return [Array]
31- def execute_workflow ( input_source , full_text , document_alias , priority )
33+ def execute_workflow ( input_source , full_text , document_alias , priority , public_url )
3234 check_api_key
33- response = workflow_execution_req_post ( input_source , document_alias , priority , full_text )
35+ response = workflow_execution_req_post ( input_source , document_alias , priority , full_text , public_url )
3436 hashed_response = JSON . parse ( response . body , object_class : Hash )
3537 return [ hashed_response , response . body ] if ResponseValidation . valid_async_response? ( response )
3638
@@ -43,8 +45,10 @@ def execute_workflow(input_source, full_text, document_alias, priority)
4345 # @param document_alias [String, nil] Alias to give to the document.
4446 # @param priority [Symbol, nil] Priority to give to the document.
4547 # @param full_text [Boolean] Whether to include the full OCR text response in compatible APIs.
48+ # @param public_url [String, nil] A unique, encrypted URL for accessing the document validation interface without
49+ # requiring authentication.
4650 # @return [Net::HTTPResponse, nil]
47- def workflow_execution_req_post ( input_source , document_alias , priority , full_text )
51+ def workflow_execution_req_post ( input_source , document_alias , priority , full_text , public_url )
4852 uri = URI ( @url )
4953 params = { }
5054 params [ :full_text_ocr ] = 'true' if full_text
@@ -61,6 +65,7 @@ def workflow_execution_req_post(input_source, document_alias, priority, full_tex
6165 [ input_source . read_document ]
6266 end
6367 form_data . push [ 'alias' , document_alias ] if document_alias
68+ form_data . push [ 'public_url' , public_url ] if public_url
6469 form_data . push [ 'priority' , priority . to_s ] if priority
6570
6671 req . set_form ( form_data , 'multipart/form-data' )
0 commit comments