RUBY-787 Build response hash