Class: MOCO::WebHook
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- MOCO::WebHook
- Defined in:
- lib/moco/entities/web_hook.rb
Overview
Represents a MOCO webhook Provides methods for webhook-specific operations
Instance Attribute Summary
Attributes inherited from BaseEntity
Class Method Summary collapse
-
.entity_path ⇒ Object
Override entity_path to match API path.
Instance Method Summary collapse
- #disable ⇒ Object
-
#enable ⇒ Object
Instance methods for webhook-specific operations.
- #to_s ⇒ Object
Methods inherited from BaseEntity
#==, #association, #destroy, #eql?, #has_many, #hash, #id, #initialize, #inspect, #reload, #save, #to_h, #to_json, #update
Constructor Details
This class inherits a constructor from MOCO::BaseEntity
Class Method Details
.entity_path ⇒ Object
Override entity_path to match API path
8 9 10 |
# File 'lib/moco/entities/web_hook.rb', line 8 def self.entity_path "account/web_hooks" end |
Instance Method Details
#disable ⇒ Object
18 19 20 21 |
# File 'lib/moco/entities/web_hook.rb', line 18 def disable client.put("account/web_hooks/#{id}/disable") self end |
#enable ⇒ Object
Instance methods for webhook-specific operations
13 14 15 16 |
# File 'lib/moco/entities/web_hook.rb', line 13 def enable client.put("account/web_hooks/#{id}/enable") self end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/moco/entities/web_hook.rb', line 23 def to_s "#{target} - #{url}" end |