class Pinnacle::InboundMessage
def self.from_json(json_object:)
-
(Pinnacle::InboundMessage)
-
Parameters:
-
json_object
(String
) --
def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) from = parsed_json["from"] to = parsed_json["to"] message_type = parsed_json["messageType"] if parsed_json["metadata"].nil? metadata = nil else metadata = parsed_json["metadata"].to_json metadata = Pinnacle::InboundMessageMetadata.from_json(json_object: metadata) end new( from: from, to: to, message_type: message_type, metadata: metadata, additional_properties: struct ) end