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

Returns a new instance of Client.



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

def initialize(email_or_hash, password = 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 }
  else
    @email_address = email_or_hash
    @password      = password
  end
end

Instance Attribute Details

#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