class Workarea::Orderbot::Response

Public Class Methods

new(response) click to toggle source
# File lib/workarea/orderbot/response.rb, line 4
def initialize(response)
  @response = response
end

Public Instance Methods

body() click to toggle source
# File lib/workarea/orderbot/response.rb, line 12
def body
  @body ||= JSON.parse(@response.body)
end
error_details() click to toggle source
# File lib/workarea/orderbot/response.rb, line 24
def error_details
  body["errors"].to_s
end
headers() click to toggle source
# File lib/workarea/orderbot/response.rb, line 16
def headers
  @headers ||= @response.headers
end
success?() click to toggle source
# File lib/workarea/orderbot/response.rb, line 8
def success?
  @response.success?
end
total_pages() click to toggle source
# File lib/workarea/orderbot/response.rb, line 20
def total_pages
  headers["x-total-pages"]
end