Class: ContextIO::Webhook
- Inherits:
-
Object
- Object
- ContextIO::Webhook
show all
- Includes:
- API::Resource
- Defined in:
- lib/contextio/webhook.rb
Instance Attribute Summary
#api_attributes, #primary_key, #resource_url
Instance Method Summary
collapse
Instance Method Details
#activate ⇒ Object
27
28
29
|
# File 'lib/contextio/webhook.rb', line 27
def activate
api.request(:post, resource_url, active: 1)['success']
end
|
#active? ⇒ Boolean
19
20
21
|
# File 'lib/contextio/webhook.rb', line 19
def active?
!!active
end
|
#deactivate ⇒ Object
31
32
33
|
# File 'lib/contextio/webhook.rb', line 31
def deactivate
api.request(:post, resource_url, active: 0)['success']
end
|
#delete ⇒ Object
35
36
37
|
# File 'lib/contextio/webhook.rb', line 35
def delete
api.request(:delete, resource_url)['success']
end
|
#failure? ⇒ Boolean
23
24
25
|
# File 'lib/contextio/webhook.rb', line 23
def failure?
!!failure
end
|