Class: Updox::Models::User
- Inherits:
-
Model
- Object
- Hashie::Trash
- Model
- Updox::Models::User
show all
- Defined in:
- lib/updox/models/user.rb
Constant Summary
collapse
- SAVE_ENDPOINT =
'/UserSave'.freeze
- QUERY_ENDPOINT =
'/UserList'.freeze
- FIND_ENDPOINT =
'/UserGet'.freeze
- LIST_TYPE =
'userList'.freeze
- LIST_NAME =
'users'
- ITEM_TYPE =
'user'
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Model
#error_message, exists?, from_response, request, #response_code, #response_message, #successful?, sync
Class Method Details
.find(user_id, account_id:) ⇒ Object
47
48
49
|
# File 'lib/updox/models/user.rb', line 47
def self.find(user_id, account_id: )
request(endpoint: FIND_ENDPOINT, account_id: account_id, body: { userId: user_id}, required_auths: Updox::Models::Auth::AUTH_ACCT)
end
|
Instance Method Details
#create(account_id:) ⇒ Object
43
44
45
|
# File 'lib/updox/models/user.rb', line 43
def create(account_id: )
self.class.request(endpoint: SAVE_ENDPOINT, body: self.to_h, auth: {accountId: account_id}, required_auths: Updox::Models::Auth::AUTH_ACCT)
end
|