class B2bCenterApi::WebService::Response
Attributes
body[R]
result[R]
ret[R]
status[R]
Public Class Methods
new(response)
click to toggle source
# File lib/b2b_center_api/web_service/response.rb, line 8 def initialize(response) @body = response.body @ret = @body.values[0][:return] @status = @ret.delete(:status) if @status[:error_code] == '0' @result = @ret else fail B2bCenterApi::EtpError, format('Код ошибки: %s, Сообщение: %s', @status[:error_code], @status[:error_message]) end end