2018-08-03 13:22:24 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2012-11-19 13:14:05 -05:00
|
|
|
class ServiceHook < WebHook
|
|
|
|
belongs_to :service
|
2017-07-20 11:12:06 -04:00
|
|
|
validates :service, presence: true
|
2015-01-23 19:10:43 -05:00
|
|
|
|
2018-08-27 11:31:01 -04:00
|
|
|
# rubocop: disable CodeReuse/ServiceClass
|
2018-11-15 10:55:51 -05:00
|
|
|
def execute(data, hook_name = 'service_hook')
|
|
|
|
WebHookService.new(self, data, hook_name).execute
|
2015-01-23 19:10:43 -05:00
|
|
|
end
|
2018-08-27 11:31:01 -04:00
|
|
|
# rubocop: enable CodeReuse/ServiceClass
|
2012-11-19 13:14:05 -05:00
|
|
|
end
|