class Ecertic::Response

Attributes

http_response[R]

Public Class Methods

from_faraday_response(faraday_response) click to toggle source
# File lib/ecertic/response.rb, line 27
def self.from_faraday_response(faraday_response)
  http_response = {
    body: faraday_response.body,
    raw_body: faraday_response.env[:raw_body],
    headers: faraday_response.headers,
    status: faraday_response.status,
  }
  new(http_response)
end
new(http_response) click to toggle source
# File lib/ecertic/response.rb, line 7
def initialize(http_response)
  @http_response = http_response
end

Public Instance Methods

body() click to toggle source
# File lib/ecertic/response.rb, line 11
def body
  http_response[:body]
end
headers() click to toggle source
# File lib/ecertic/response.rb, line 19
def headers
  http_response[:headers]
end
raw_body() click to toggle source
# File lib/ecertic/response.rb, line 15
def raw_body
  http_response[:raw_body]
end
status() click to toggle source
# File lib/ecertic/response.rb, line 23
def status
  http_response[:status]
end