Class: Sumac::Message::Exchange::ShutdownNotification

Inherits:
Notification show all
Defined in:
lib/sumac/message/exchange/shutdown_notification.rb

Instance Method Summary collapse

Methods inherited from Base

from_json_structure

Methods inherited from Sumac::Message::Exchange

from_json_structure

Methods inherited from Sumac::Message

from_json, #initialize, #to_json

Constructor Details

This class inherits a constructor from Sumac::Message

Instance Method Details

#invert_orginObject



20
21
22
# File 'lib/sumac/message/exchange/shutdown_notification.rb', line 20

def invert_orgin
  nil
end

#parse_json_structure(json_structure) ⇒ Object

Raises:



6
7
8
9
10
11
# File 'lib/sumac/message/exchange/shutdown_notification.rb', line 6

def parse_json_structure(json_structure)
  raise MessageError unless json_structure.is_a?(Hash) &&
    json_structure['message_type'] == 'exchange' &&
    json_structure['exchange_type'] == 'shutdown_notification'
  nil
end

#to_json_structureObject



13
14
15
16
17
18
# File 'lib/sumac/message/exchange/shutdown_notification.rb', line 13

def to_json_structure
  {
    'message_type' => 'exchange',
    'exchange_type' => 'shutdown_notification'
  }
end