2018-11-20 20:47:30 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-09-02 18:07:02 +05:30
|
|
|
class ServiceHook < WebHook
|
2020-01-01 13:55:28 +05:30
|
|
|
include Presentable
|
|
|
|
|
2014-09-02 18:07:02 +05:30
|
|
|
belongs_to :service
|
2017-09-10 17:25:29 +05:30
|
|
|
validates :service, presence: true
|
2015-09-11 14:41:01 +05:30
|
|
|
|
2018-12-05 23:21:45 +05:30
|
|
|
# rubocop: disable CodeReuse/ServiceClass
|
2019-02-15 15:39:39 +05:30
|
|
|
def execute(data, hook_name = 'service_hook')
|
|
|
|
WebHookService.new(self, data, hook_name).execute
|
2015-09-11 14:41:01 +05:30
|
|
|
end
|
2018-12-05 23:21:45 +05:30
|
|
|
# rubocop: enable CodeReuse/ServiceClass
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|