Class: Updox::Models::User

Inherits:
Model
  • Object
show all
Defined in:
lib/updox/models/user.rb

Constant Summary collapse

SAVE_ENDPOINT =
'/UserSave'.freeze
QUERY_ENDPOINT =
'/UserList'.freeze
LIST_TYPE =
'userList'.freeze
LIST_NAME =
'users'

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

from_response

Class Method Details

.queryObject



35
36
37
# File 'lib/updox/models/user.rb', line 35

def self.query
  from_response(UpdoxClient.connection.request(endpoint: QUERY_ENDPOINT, required_auths: Updox::Models::Auth::AUTH_APP), self)
end

Instance Method Details

#createObject



31
32
33
# File 'lib/updox/models/user.rb', line 31

def create
  UpdoxClient.connection.request(endpoint: SAVE_ENDPOINT, body: self.to_h, required_auths: Updox::Models::Auth::AUTH_APP)
end