2017-04-27 06:08:57 -04:00
|
|
|
class WebHookLog < ActiveRecord::Base
|
|
|
|
belongs_to :web_hook
|
|
|
|
|
2017-05-31 07:47:36 -04:00
|
|
|
serialize :request_headers, Hash # rubocop:disable Cop/ActiverecordSerialize
|
|
|
|
serialize :request_data, Hash # rubocop:disable Cop/ActiverecordSerialize
|
|
|
|
serialize :response_headers, Hash # rubocop:disable Cop/ActiverecordSerialize
|
2017-04-27 06:08:57 -04:00
|
|
|
|
|
|
|
validates :web_hook, presence: true
|
|
|
|
|
|
|
|
def success?
|
|
|
|
response_status =~ /^2/
|
|
|
|
end
|
|
|
|
end
|