Class: Outhad::Integrations::Protocol::ProtocolModel

Inherits:
Dry::Struct
  • Object
show all
Extended by:
Core::Utils
Defined in:
lib/outhad/integrations/protocol/protocol.rb

Class Method Summary collapse

Methods included from Core::Utils

build_catalog, build_stream, convert_to_json_schema, create_log_message, extract_data, handle_exception, hash_to_string, keys_to_symbols, log_request_response, logger, map_type_to_json_schema, report_exception, success?

Class Method Details

.from_json(json_string) ⇒ Object



35
36
37
38
# File 'lib/outhad/integrations/protocol/protocol.rb', line 35

def from_json(json_string)
  data = JSON.parse(json_string)
  new(keys_to_symbols(data))
end