Class: SbrfMerchant::Api::Response::BodyPostProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/sbrf_merchant/api/response/body_postprocessor.rb

Instance Method Summary collapse

Instance Method Details

#call(body) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/sbrf_merchant/api/response/body_postprocessor.rb', line 12

def call(body)
  ::SbrfMerchant::Utils::HighOrderFunctions::Compose.new(
    ::SbrfMerchant::Utils::JSON::ToHashParser.new,
    ::SbrfMerchant::Api::Response::AppendSuccessFlagToHash.new,
    ->(hash) { ::SbrfMerchant::Api::Response::BodyDecorator.new(hash) }
  ).call(body)
end