Class: Clicksign::Signer

Inherits:
Base
  • Object
show all
Defined in:
lib/clicksign/signer.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

api_url, build_data, headers, parse, request

Constructor Details

#initialize(envelope_key) ⇒ Signer

Returns a new instance of Signer.



9
10
11
# File 'lib/clicksign/signer.rb', line 9

def initialize(envelope_key)
  @envelope_key = envelope_key
end

Instance Attribute Details

#envelope_keyObject

Returns the value of attribute envelope_key.



7
8
9
# File 'lib/clicksign/signer.rb', line 7

def envelope_key
  @envelope_key
end

Class Method Details

.model_nameObject



3
4
5
# File 'lib/clicksign/signer.rb', line 3

def self.model_name
  'signers'
end

Instance Method Details

#add(params = {}) ⇒ Object



17
18
19
20
21
22
# File 'lib/clicksign/signer.rb', line 17

def add params={}
  Base.request :post,
    Base.api_url('envelopes', @envelope_key, model_name),
    Base.build_data(params, model_name),
    {}
end

#model_nameObject



13
14
15
# File 'lib/clicksign/signer.rb', line 13

def model_name
  self.class.model_name
end