Module: AthenaHealth::Endpoints::Departments
- Included in:
- Client
- Defined in:
- lib/athena_health/endpoints/departments.rb
Instance Method Summary collapse
- #all_departments(practice_id:, params: {}) ⇒ Object
- #find_department(practice_id:, department_id:, params: {}) ⇒ Object
Instance Method Details
#all_departments(practice_id:, params: {}) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# 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: {}) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# 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 |