module HelloSign::Api::Account

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]

Public Instance Methods

create_account(opts) click to toggle source

Creates a new HelloSign account. The user will need to confirm the email address to complete the creation process. @option opts [String] email_address New user's email address

@return [HelloSign::Resource::Account] New user's Account

@example

account = @client.create_account email_address: 'newuser@example.com'
# File lib/hello_sign/api/account.rb, line 51
def create_account(opts)
  HelloSign::Resource::Account.new post('/account/create', body: opts)
end
get_account() click to toggle source

Returns the current user's account information.

@return [HelloSign::Resource::Account] Current user's Account

@example

account = @client.get_account
# File lib/hello_sign/api/account.rb, line 39
def get_account
  HelloSign::Resource::Account.new get('/account')
end
update_account(opts) click to toggle source

Updates the current user's Account Callback URL. @option opts [String] callback_url New callback URL

@return [HelloSign::Resource::Account] Updated Account

@example

account = @client.update_account callback_url: 'https://www.example.com/callback'
# File lib/hello_sign/api/account.rb, line 62
def update_account(opts)
  HelloSign::Resource::Account.new post('/account', body: opts)
end
verify(opts) click to toggle source

Checks whether an Account exists @option opts [String] email_address User's email address

@return [Bool] true if exists, else false

@example

account = @client.verify email_address: 'newuser@example.com'
# File lib/hello_sign/api/account.rb, line 73
def verify(opts)
  post('/account/verify', body: opts).empty? ? false : true
end