Class: HelloSign::Client

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Proxy
Defined in:
lib/hello_sign/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Proxy

#account, #reusable_form, #signature_request, #team, #unclaimed_draft

Constructor Details

#initialize(email_or_hash, password = nil, client_id = nil) ⇒ Client

Returns a new instance of Client.



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/hello_sign/client.rb', line 13

def initialize(email_or_hash, password = nil, client_id = nil)
  if email_or_hash.is_a?(Hash)
    @email_address = email_or_hash.fetch(:email_address) { raise ArgumentError }
    @password      = email_or_hash.fetch(:password) { raise ArgumentError }
    @client_id     = email_or_hash.fetch(:client_id)
  else
    @email_address = email_or_hash
    @password      = password
    @client_id     = client_id
  end
end

Instance Attribute Details

#client_idObject (readonly)

Returns the value of attribute client_id.



11
12
13
# File 'lib/hello_sign/client.rb', line 11

def client_id
  @client_id
end

#email_addressObject (readonly)

Returns the value of attribute email_address.



11
12
13
# File 'lib/hello_sign/client.rb', line 11

def email_address
  @email_address
end

#passwordObject (readonly)

Returns the value of attribute password.



11
12
13
# File 'lib/hello_sign/client.rb', line 11

def password
  @password
end