lib/hello_sign/api/signature_request.rb in hellosign-ruby-sdk-3.0.3 vs lib/hello_sign/api/signature_request.rb in hellosign-ruby-sdk-3.0.4
- old
+ new
@@ -17,11 +17,11 @@
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest object
#
# @example
# signature_request = @client.get_signature_request :signature_request_id => 'fa5c8a0b0f492d768749333ad6fcc214c111e967'
#
- def get_signature_request opts
+ def get_signature_request(opts)
HelloSign::Resource::SignatureRequest.new get("/signature_request/#{opts[:signature_request_id]}")
end
#
# Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on.
@@ -30,13 +30,13 @@
# @return [HelloSign::Resource::ResourceArray]
#
# @example
# signature_requests = @client.get_signature_requests :page => 1
#
- def get_signature_requests opts={}
+ def get_signature_requests(opts={})
path = '/signature_request/list'
- path += opts[:page] ? "?page=#{opts[:page]}" : ""
+ path += opts[:page] ? "?page=#{opts[:page]}" : ''
HelloSign::Resource::ResourceArray.new get(path, opts), 'signature_requests', HelloSign::Resource::SignatureRequest
end
#
# Creates and sends a new SignatureRequest with the submitted documents.
@@ -78,11 +78,11 @@
# :cc_email_addresses => ['lawyer@example.com', 'lawyer@example2.com'],
# :files => ['NDA.pdf', 'AppendixA.pdf']
# )
#
- def send_signature_request opts
+ def send_signature_request(opts)
prepare_files opts
prepare_signers opts
HelloSign::Resource::SignatureRequest.new post('/signature_request/send', :body => opts)
end
@@ -128,11 +128,11 @@
# {
# :CustomFieldName => '$20,000'
# }
# )
#
- def send_signature_request_with_template opts
+ def send_signature_request_with_template(opts)
prepare_signers opts
prepare_ccs opts
HelloSign::Resource::SignatureRequest.new post('/signature_request/send_with_template', :body => opts)
end
@@ -143,21 +143,21 @@
#
# @return [HelloSign::Resource::SignatureRequest] a SignatureRequest
# @example
# signature_request = @client.remind_signature_request :signature_request_id => '75cdf7dc8b323d43b347e4a3614d1f822bd09491', :email_address => 'john@example.com'
#
- def remind_signature_request opts
+ def remind_signature_request(opts)
HelloSign::Resource::SignatureRequest.new post("/signature_request/remind/#{opts[:signature_request_id]}", :body => opts)
end
#
# Cancels a SignatureRequest.
# @option opts [String] signature_request_id The id of the SignatureRequest to cancel.
#
# @example
# @client.cancel_signature_request :signature_request_id => '75cdf7dc8b323d43b347e4a3614d1f822bd09491'
- def cancel_signature_request opts
+ def cancel_signature_request(opts)
post("/signature_request/cancel/#{opts[:signature_request_id]}", :body => opts)
end
#
# Download the PDF copy of the current documents specified by the signature_request_id parameter.
@@ -167,11 +167,11 @@
# @return a PDF
#
# @example
# pdf = @client.signature_request_files :signature_request_id => '75cdf7dc8b323d43b347e4a3614d1f822bd09491'
#
- def signature_request_files opts
+ 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
get(path)
@@ -217,11 +217,11 @@
# ],
# :cc_email_addresses => ['lawyer@example.com', 'lawyer@example2.com'],
# :files => ['NDA.pdf', 'AppendixA.pdf']
# )
#
- def create_embedded_signature_request opts
+ def create_embedded_signature_request(opts)
opts[:client_id] ||= self.client_id
prepare_files opts
prepare_signers opts
HelloSign::Resource::SignatureRequest.new post('/signature_request/create_embedded', :body => opts)
@@ -271,10 +271,10 @@
# :custom_fields => {
# :Cost => '$20,000'
# }
# )
#
- def create_embedded_signature_request_with_template opts
+ def create_embedded_signature_request_with_template(opts)
opts[:client_id] ||= self.client_id
prepare_signers opts
prepare_ccs opts
HelloSign::Resource::SignatureRequest.new post('/signature_request/create_embedded_with_template', :body => opts)