class TpagaService::Swagger::Response

Public Class Methods

new(code_response, body_response) click to toggle source
Parameters:

*code_response : Integer *message_error : Hash

# File lib/tpaga_service/swagger/response.rb, line 8
def initialize(code_response, body_response)
  case code_response
  when 500..510 then raise ServerError.new(code_response, body_response) #(ServerError, body_response)
  when 299..426 then raise ClientError.new(code_response, body_response) #(ClientError, body_response)
  end
end