Class: ContextIO::Lite::Webhook
- Inherits:
-
Object
- Object
- ContextIO::Lite::Webhook
show all
- Includes:
- API::Resource
- Defined in:
- lib/contextio/lite/webhook.rb
Instance Attribute Summary
#api, #api_attributes, #primary_key, #resource_url, #with_constraints
Instance Method Summary
collapse
#initialize, #with
Instance Method Details
#activate ⇒ Object
30
31
32
|
# File 'lib/contextio/lite/webhook.rb', line 30
def activate
api.request(:post, resource_url, active: 1)['success']
end
|
#active? ⇒ Boolean
22
23
24
|
# File 'lib/contextio/lite/webhook.rb', line 22
def active?
!!active
end
|
#deactivate ⇒ Object
34
35
36
|
# File 'lib/contextio/lite/webhook.rb', line 34
def deactivate
api.request(:post, resource_url, active: 0)['success']
end
|
#delete ⇒ Object
38
39
40
|
# File 'lib/contextio/lite/webhook.rb', line 38
def delete
api.request(:delete, resource_url)['success']
end
|
#failure? ⇒ Boolean
26
27
28
|
# File 'lib/contextio/lite/webhook.rb', line 26
def failure?
!!failure
end
|