module AthenaHealth::Endpoints::Departments

Public Instance Methods

all_departments(practice_id:, params: {}) click to toggle source
# File lib/athena_health/endpoints/departments.rb, line 4
def all_departments(practice_id:, params: {})
  response = @api.call(
    endpoint: "#{practice_id}/departments",
    method: :get,
    params: params
  )

  DepartmentCollection.new(response)
end
find_department(practice_id:, department_id:, params: {}) click to toggle source
# File lib/athena_health/endpoints/departments.rb, line 14
def find_department(practice_id:, department_id:, params: {})
  response = @api.call(
    endpoint: "#{practice_id}/departments/#{department_id}",
    method: :get,
    params: params
  )

  Department.new(response.first)
end