class Pinnacle::InboundMessageMetadata

def self.from_json(json_object:)

Returns:
  • (Pinnacle::InboundMessageMetadata) -

Parameters:
  • json_object (String) --
def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  if parsed_json["sender"].nil?
    sender = nil
  else
    sender = parsed_json["sender"].to_json
    sender = Pinnacle::SenderMetadata.from_json(json_object: sender)
  end
  if parsed_json["message"].nil?
    message = nil
  else
    message = parsed_json["message"].to_json
    message = Pinnacle::MessageMetadata.from_json(json_object: message)
  end
  new(
    sender: sender,
    message: message,
    additional_properties: struct
  )
end

def self.validate_raw(obj:)

Returns:
  • (Void) -

Parameters:
  • obj (Object) --
def self.validate_raw(obj:)
  obj.sender.nil? || Pinnacle::SenderMetadata.validate_raw(obj: obj.sender)
  obj.message.nil? || Pinnacle::MessageMetadata.validate_raw(obj: obj.message)
end

def initialize(sender: OMIT, message: OMIT, additional_properties: nil)

Returns:
  • (Pinnacle::InboundMessageMetadata) -

Parameters:
  • additional_properties (OpenStruct) -- Additional properties unmapped to the current class definition
  • message (Pinnacle::MessageMetadata) --
  • sender (Pinnacle::SenderMetadata) --
def initialize(sender: OMIT, message: OMIT, additional_properties: nil)
  @sender = sender if sender != OMIT
  @message = message if message != OMIT
  @additional_properties = additional_properties
  @_field_set = { "sender": sender, "message": message }.reject do |_k, v|
    v == OMIT
  end
end

def to_json(*_args)

Returns:
  • (String) -
def to_json(*_args)
  @_field_set&.to_json
end