module RightSignature::Account
Public Instance Methods
add_user(name, email)
click to toggle source
Creates a user on API user’s account
-
name: User’s name
-
email: User’s email
Ex.
@rs_connection.add_user("John Bellingham", "john@example.com")
# File lib/rightsignature/account.rb, line 19 def add_user(name, email) post "/api/users.xml", {:user => {:name => name, :email => email}} end
usage_report(since=nil, signed=nil)
click to toggle source
Return account’s usage report (# of documents sent)
-
since: (“month”/“week”/“day”) only count documents sent within a certain time
-
signed: (true/false) only count signed document
Ex. Return count of signed documents sent this month
@rs_connection.usage_report("month", true)
# File lib/rightsignature/account.rb, line 30 def usage_report(since=nil, signed=nil) options = {} options[:since] = since if since && ["month", "week", "day"].include?(since) options[:signed] = signed.to_s unless signed.nil? get "/api/account/usage_report.xml", options end
user_details()
click to toggle source
Return account information about API user
Ex.
@rs_connection.user_details
# File lib/rightsignature/account.rb, line 8 def user_details get "/api/users/user_details.xml" end