Module: Justifi::JustifiResponseBase

Included in:
JustifiResponse
Defined in:
lib/justifi/justifi_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#http_headersObject

A Hash of the HTTP headers of the response.



42
43
44
# File 'lib/justifi/justifi_response.rb', line 42

def http_headers
  @http_headers
end

#http_statusObject

The integer HTTP status code of the response.



45
46
47
# File 'lib/justifi/justifi_response.rb', line 45

def http_status
  @http_status
end

#request_idObject

The JustiFi request ID of the response.



48
49
50
# File 'lib/justifi/justifi_response.rb', line 48

def request_id
  @request_id
end

Class Method Details

.populate_for_net_http(resp, http_resp) ⇒ Object



50
51
52
53
54
# File 'lib/justifi/justifi_response.rb', line 50

def self.populate_for_net_http(resp, http_resp)
  resp.http_headers = JustifiResponseHeaders.from_net_http(http_resp)
  resp.http_status = http_resp.code.to_i
  resp.request_id = http_resp["request-id"]
end