Module: LoyverseApi::Endpoints::Employees
- Included in:
- Client
- Defined in:
- lib/loyverse_api/endpoints/employees.rb
Instance Method Summary collapse
-
#get_employee(employee_id) ⇒ Hash
Get a specific employee by ID.
-
#list_employees(limit: 250, cursor: nil, updated_at_min: nil, updated_at_max: nil) ⇒ Hash
List employees.
Instance Method Details
#get_employee(employee_id) ⇒ Hash
Get a specific employee by ID
9 10 11 |
# File 'lib/loyverse_api/endpoints/employees.rb', line 9 def get_employee(employee_id) get("employees/#{employee_id}") end |
#list_employees(limit: 250, cursor: nil, updated_at_min: nil, updated_at_max: nil) ⇒ Hash
List employees
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/loyverse_api/endpoints/employees.rb', line 19 def list_employees(limit: 250, cursor: nil, updated_at_min: nil, updated_at_max: nil) params = { limit: limit, cursor: cursor, updated_at_min: format_time(updated_at_min), updated_at_max: format_time(updated_at_max) }.compact get("employees", params: params) end |