Module: Signnow::Operations::Show::ClassMethods

Defined in:
lib/signnow/operations/show.rb

Instance Method Summary collapse

Instance Method Details

#options_for_show(attributes) ⇒ Hash

Options for show overwrite this in the model to set security

Returns:

  • (Hash)

Raises:



28
29
30
31
32
33
34
# File 'lib/signnow/operations/show.rb', line 28

def options_for_show(attributes)
  raise AuthenticationError unless attributes[:access_token]
  {
    auth_type: :user_token,
    auth_token: attributes[:access_token]
  }
end

#show(attributes = {}) ⇒ Signnow::Base

Shows a given object

Parameters:

  • id (Integer)

    The id of the object that should be shown

Returns:



9
10
11
12
# File 'lib/signnow/operations/show.rb', line 9

def show(attributes={})
  response = Signnow.request(:get, nil, api_show_url(attributes[:id]), {}, options_for_show(attributes))
  self.new(response)
end