Class: HelloSign::Client
- Inherits:
-
Object
- Object
- HelloSign::Client
- Includes:
- Proxy
- Defined in:
- lib/hello_sign/client.rb
Constant Summary collapse
- API_ENDPOINT =
'https://api.hellosign.com'- API_VERSION =
'/v3'
Instance Attribute Summary collapse
-
#email_address ⇒ Object
readonly
Returns the value of attribute email_address.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
Instance Method Summary collapse
- #get(path, options = {}) ⇒ Object
-
#initialize(email_address_or_hash, password = nil) ⇒ Client
constructor
A new instance of Client.
- #post(path, options = {}) ⇒ Object
Methods included from Proxy
#account, #reusable_form, #signature_request, #team, #unclaimed_draft
Constructor Details
#initialize(email_address_or_hash, password = nil) ⇒ Client
Returns a new instance of Client.
15 16 17 18 19 20 21 22 23 |
# File 'lib/hello_sign/client.rb', line 15 def initialize(email_address_or_hash, password = nil) if email_address_or_hash.is_a? Hash @email_address = email_address_or_hash.fetch(:email_address) { raise ArgumentError } @password = email_address_or_hash.fetch(:password) { raise ArgumentError } else @email_address = email_address_or_hash @password = password end end |
Instance Attribute Details
#email_address ⇒ Object (readonly)
Returns the value of attribute email_address.
13 14 15 |
# File 'lib/hello_sign/client.rb', line 13 def email_address @email_address end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
13 14 15 |
# File 'lib/hello_sign/client.rb', line 13 def password @password end |
Instance Method Details
#get(path, options = {}) ⇒ Object
25 26 27 |
# File 'lib/hello_sign/client.rb', line 25 def get(path, = {}) request(:get, path, ) end |
#post(path, options = {}) ⇒ Object
29 30 31 |
# File 'lib/hello_sign/client.rb', line 29 def post(path, = {}) request(:post, path, ) end |