hellosign / hellosign-ruby-sdk

A Ruby SDK for HelloSign's API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for :get_url SignatureRequest#signature_request_files

ignacy opened this issue · comments

Signature Request Get Files API supports get_url parameter which returns URL to file instead of the file itself but it's impossible to pass this parameter to this method:

https://github.com/HelloFax/hellosign-ruby-sdk/blob/e97b07995d5e1c59e0d771cdebf17ff8b73493a9/lib/hello_sign/api/signature_request.rb#L245-L251

+1

+1

Wasted a ton of time on this because didn't think to check if the gem handled all the options referenced in the documentation.

Should be a quick fix to handle this option.

def signature_request_files(opts)
  path = "/signature_request/files/#{opts[:signature_request_id]}"
  if opts[:get_url]
    path = path + "?get_url=#{opts[:get_url]}"
  elsif opts[:file_type]
    path = path + "?file_type=#{opts[:file_type]}"
  end
  get(path)
end

Pull Request issued: #40

This has been added and released. Thanks all!