class Updox::Models::User

Constants

FIND_ENDPOINT
ITEM_TYPE
LIST_NAME
LIST_TYPE
QUERY_ENDPOINT
SAVE_ENDPOINT

Public Class Methods

find(user_id, account_id: ) click to toggle source
# File lib/updox/models/user.rb, line 49
def self.find(user_id, account_id: )
  response = request(endpoint: FIND_ENDPOINT, account_id: account_id, body: { userId: user_id}, required_auths: Updox::Models::Auth::AUTH_ACCT)

  if response.successful?
    response
  else
    nil
  end
end
query() click to toggle source
# File lib/updox/models/user.rb, line 59
def self.query
  request(endpoint: QUERY_ENDPOINT, required_auths: Updox::Models::Auth::AUTH_APP)
end

Public Instance Methods

create(account_id: ) click to toggle source
# File lib/updox/models/user.rb, line 45
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