Class: TheCity::WebHook
Constant Summary collapse
- Objects =
{:user => 'user', :group => 'group', :invitation => 'invitation', :privilege => 'privilege', :checkin => 'checkin', :address => 'address', :group_tag => 'group_tag', :fund => 'fund', :pledge => 'pledge', :donation => 'donation'}
- Events =
{:create => 'create', :update => 'update', :destroy => 'destroy', :expire => 'expire'}
Instance Attribute Summary
Attributes inherited from ApiObject
#error_messages, #marked_for_destruction
Instance Method Summary collapse
-
#initialize(json_data = nil) ⇒ WebHook
constructor
Constructor.
-
#name ⇒ Object
The name of the hook based on the event and object.
Methods inherited from ApiObject
__tc_attributes, #delete, #initialize_from_json_object, #is_deleted?, #save, #set_attributes, tc_attr_accessor, #to_attributes
Constructor Details
#initialize(json_data = nil) ⇒ WebHook
Constructor.
19 20 21 22 |
# File 'lib/api/web_hook.rb', line 19 def initialize(json_data = nil) @writer_object = WebHookWriter initialize_from_json_object(json_data) unless json_data.nil? end |
Instance Method Details
#name ⇒ Object
The name of the hook based on the event and object
26 27 28 |
# File 'lib/api/web_hook.rb', line 26 def name "#{self.object}::#{self.event}" end |