Module: HelloSign::Api::Account

Included in:
Client
Defined in:
lib/hello_sign/api/account.rb

Overview

Contains all the API calls for the Account resource. Take a look at our API Documentation on the Account resource (app.hellosign.com/api/reference#Account) for more information about this.

Author:

  • hellosign

Instance Method Summary collapse

Instance Method Details

#create_account(opts) ⇒ HelloSign::Resource::Account

Creates a new HelloSign account. The user will still need to confirm the email address to complete the creation process.

Note: This request does not require authentication.

Examples:

 = @client. :email_address => '[email protected]'

Parameters:

  • opts (Hash)

    a customizable set of options

Options Hash (opts):

  • email_address (String)

    New user’s email address

Returns:



61
62
63
# File 'lib/hello_sign/api/account.rb', line 61

def (opts)
  HelloSign::Resource::Account.new post('/account/create', :body => opts)
end

#get_accountHelloSign::Resource::Account

Returns the current user’s account information.

Examples:

 = @client.

Returns:



44
45
46
# File 'lib/hello_sign/api/account.rb', line 44

def 
  HelloSign::Resource::Account.new get('/account')
end

#update_account(opts) ⇒ HelloSign::Resource::Account

Updates the current user’s callback URL

Examples:

 = @client. :callback_url => 'https://www.example.com/callback'

Parameters:

  • opts (Hash)

    a customizable set of options

Options Hash (opts):

  • callback_url (String)

    New user’s callback url

Returns:



74
75
76
# File 'lib/hello_sign/api/account.rb', line 74

def (opts)
  HelloSign::Resource::Account.new post('/account', :body => opts)
end

#verify(opts) ⇒ Bool

Check whether an account exists

Examples:

 = @client.verify :email_address => '[email protected]'

Parameters:

  • opts (Hash)

    a customizable set of options

Options Hash (opts):

  • email_address (String)

    user email

Returns:

  • (Bool)

    true if exists, else false



86
87
88
# File 'lib/hello_sign/api/account.rb', line 86

def verify(opts)
  post('/account/verify', :body => opts).empty? ? false : true
end