Class: Fakturoid::Api::Webhook
- Inherits:
-
Object
- Object
- Fakturoid::Api::Webhook
show all
- Includes:
- Base
- Defined in:
- lib/fakturoid/api/webhook.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/webhook.rb', line 8
def all(params = {})
request_params = Utils.permit_params(params, :page)
perform_request(HTTP_GET, "webhooks.json", request_params: request_params)
end
|
#create(payload = {}) ⇒ Object
19
20
21
|
# File 'lib/fakturoid/api/webhook.rb', line 19
def create(payload = {})
perform_request(HTTP_POST, "webhooks.json", payload: payload)
end
|
#update(id, payload = {}) ⇒ Object
23
24
25
26
|
# File 'lib/fakturoid/api/webhook.rb', line 23
def update(id, payload = {})
Utils.validate_numerical_id(id)
perform_request(HTTP_PATCH, "webhooks/#{id}.json", payload: payload)
end
|