lib/hello_sign/api/signature_request.rb in hellosign-ruby-sdk-3.2.14 vs lib/hello_sign/api/signature_request.rb in hellosign-ruby-sdk-3.2.15
- old
+ new
@@ -236,10 +236,11 @@
end
#
# Download the PDF copy of the current documents specified by the signature_request_id parameter.
# @option opts [String] file_type Either 'pdf' or 'zip' depending on the file type desired. Defaults to pdf.
+ # @option opts [String] get_url Boolean. If true, the response will contain a url link to the file instead. Links are only available for PDFs and have a TTL of 3 days.Either 'pdf' or 'zip' depending on the file type desired. Defaults to false.
# @option opts [String] signature_request_id The id of the SignatureRequest to retrieve.
#
# @return a PDF
#
# @example
@@ -247,9 +248,13 @@
#
def signature_request_files(opts)
path = "/signature_request/files/#{opts[:signature_request_id]}"
if opts[:file_type]
path = path + "?file_type=#{opts[:file_type]}"
+ end
+ if opts[:get_url]
+ separator = opts[:file_type].nil? ? '?' : '&'
+ path = path + "#{separator}get_url=#{opts[:get_url]}"
end
get(path)
end
#