lib/ticket_evolution/core/endpoint/request_handler.rb
# Response Code Mappings From TicketEvolution API
Response Code Mappings From TicketEvolution API
Response Code Mappings From TicketEvolution API
def naturalize_response(response = nil)
        response = yield if block_given?
        OpenStruct.new.tap do |resp|
          resp.header = response.headers
          resp.response_code = response.status
          resp.body = (MultiJson.decode(response.body) rescue {"error" => "Internal Server Error"}).merge({:connection => self.connection})
          resp.server_message = (CODES[resp.response_code] || ['Unknown Error']).last
        end
      end
def naturalize_response ( response = nil ) response = yield if block_given? OpenStruct . new . tap do | resp | resp . header = response . headers resp . response_code = response . status resp . body = ( MultiJson . decode ( response . body ) rescue { "error" => "Internal Server Error" } ) . merge ( { :connection => self . connection } ) resp . server_message = ( CODES [ resp . response_code ] || [ 'Unknown Error' ] ) . last end end
Response Code Mappings From TicketEvolution API
Response Code Mappings From TicketEvolution API
response
<not_specific>