Class: FioAPI::ImportResponseDeserializer

Inherits:
HTTParty::Parser
  • Object
show all
Defined in:
lib/base/deserializers/import_response_deserializer.rb

Overview

ImportResponseDeserializer

Deserializer responsible for response json deserializing. Should construct object with status attributes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#statusObject

Returns the value of attribute status.



8
9
10
# File 'lib/base/deserializers/import_response_deserializer.rb', line 8

def status
  @status
end

Instance Method Details

#deserialize(json) ⇒ Object

Deserialize json

Parameters:

hash

Hash returned from payments request.

Returns:

New object with status attributes


28
29
30
31
# File 'lib/base/deserializers/import_response_deserializer.rb', line 28

def deserialize(json)
  self.status = deserialize_import(json.try_path('responseImport', 'result'))
  self
end

#parseObject

Parse json

Returns:

Should return new deserialized object


15
16
17
# File 'lib/base/deserializers/import_response_deserializer.rb', line 15

def parse
  deserialize super
end