Module: Surveygizmo::Client::AccountUser

Included in:
Surveygizmo::Client
Defined in:
lib/surveygizmo/client/account_user.rb

Overview

Defines methods related to a SurveyGizmo account user (not to be confused with a Contact)

Instance Method Summary collapse

Instance Method Details

#account_user(id) ⇒ Object

Returns account user details for a given id

Parameters:

  • id (Integer, String)

    A SurveyGizmo AccountUser ID



14
15
16
# File 'lib/surveygizmo/client/account_user.rb', line 14

def (id)
  get("accountuser/#{id}")
end

#account_usersObject

List all account users



8
9
10
# File 'lib/surveygizmo/client/account_user.rb', line 8

def 
  get('accountuser')
end

#create_account_user(options = {}) ⇒ Object

Create a new account user

Parameters:

  • options (Hash) (defaults to: {})

    provide the :email, :username and :password



20
21
22
# File 'lib/surveygizmo/client/account_user.rb', line 20

def (options = {})
  post('accountuser?_method=PUT', options)
end

#delete_account_user(id) ⇒ Object

Remove an account user

Parameters:

  • id (Integer, String)

    A SurveyGizmo AccountUser ID



26
27
28
# File 'lib/surveygizmo/client/account_user.rb', line 26

def (id)
  post("accountuser/#{id}?_method=DELETE")
end

#update_account_user(id, options = {}) ⇒ Object

Change an account user

Parameters:

  • id (Integer, String)

    A SurveyGizmo AccountUser ID

  • options (Hash) (defaults to: {})

    provide the :email, :username and :password



33
34
35
# File 'lib/surveygizmo/client/account_user.rb', line 33

def (id, options = {})
  post("accountuser/#{id}?_method=POST", options)
end