class BookingSync::API::Error
Class for rescuing all BS API
errors
Attributes
body[R]
headers[R]
status[R]
Public Class Methods
new(response)
click to toggle source
# File lib/bookingsync/api/error.rb, line 6 def initialize(response) @status = response.status @headers = response.headers @body = response.body end
Public Instance Methods
message(message = self.class)
click to toggle source
# File lib/bookingsync/api/error.rb, line 12 def message(message = self.class) %{#{message} HTTP status code : #{status} Headers : #{headers} Body : #{body}} end