Class: Fakturoid::Api::Todo
- Inherits:
-
Object
- Object
- Fakturoid::Api::Todo
show all
- Includes:
- Base
- Defined in:
- lib/fakturoid/api/todo.rb
Instance Attribute Summary
Attributes included from Base
#client
Instance Method Summary
collapse
Methods included from Base
#initialize, #perform_request
Instance Method Details
#all(params = {}) ⇒ Object
8
9
10
11
12
|
# File 'lib/fakturoid/api/todo.rb', line 8
def all(params = {})
request_params = Utils.permit_params(params, :page, :since) || {}
perform_request(HTTP_GET, "todos.json", request_params: request_params)
end
|
#toggle_completion(id) ⇒ Object
14
15
16
17
|
# File 'lib/fakturoid/api/todo.rb', line 14
def toggle_completion(id)
Utils.validate_numerical_id(id)
perform_request(HTTP_POST, "todos/#{id}/toggle_completion.json")
end
|