class Updox::Models::Practice

Constants

CREATE_ENDPOINT
FIND_ENDPOINT
ITEM_TYPE
LIST_NAME
LIST_TYPE
QUERY_ENDPOINT

Public Class Methods

exists?(account_id) click to toggle source
# File lib/updox/models/practice.rb, line 42
def self.exists?(account_id)
  false == self.find(account_id).nil?
end
find(account_id) click to toggle source
# File lib/updox/models/practice.rb, line 46
def self.find(account_id)
  response = request(endpoint: FIND_ENDPOINT, body: {accountId: account_id}, required_auths: Updox::Models::Auth::AUTH_APP)

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

Public Instance Methods

create() click to toggle source
# File lib/updox/models/practice.rb, line 38
def create
  self.class.request(endpoint: CREATE_ENDPOINT, body: self.to_h, required_auths: Updox::Models::Auth::AUTH_APP)
end