2017-04-27 06:08:57 -04:00
|
|
|
class WebHookLog < ActiveRecord::Base
|
|
|
|
belongs_to :web_hook
|
|
|
|
|
2017-07-03 10:01:41 -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
|