# frozen_string_literal: true
require 'json_api_client'
module ContextRequestSubscriber
module Handler
module JsonApiHandler
# :nodoc:
class Base < JsonApiClient::Resource - ContextRequestSubscriber::Handler::JsonApiHandler::Base has no descriptive comment
def initialize(params, **keys)
@headers = keys.fetch(:handler_headers, {})
self.class.site = keys.fetch(:site, nil)
super(params)
end
def call
self.class.with_headers(@headers) do
save
end
end
end
# :nodoc:
class Context < Base; end - ContextRequestSubscriber::Handler::JsonApiHandler::Context has no descriptive comment
# :nodoc:
class Request < Base; end - ContextRequestSubscriber::Handler::JsonApiHandler::Request has no descriptive comment
end
end
end