class FakeBsmobil::Api
Constants
- DEFAULT_HEADERS
- JSON_TYPE
Public Instance Methods
handle_error(exception)
click to toggle source
# File lib/fake_bsmobil/api.rb, line 36 def handle_error(exception) case exception when FakeBsmobil::InvalidInputError response.status = exception.status response['Content-Type'] = 'application/json' response.write exception.to_json else raise exception end end
session_id()
click to toggle source
# File lib/fake_bsmobil/api.rb, line 50 def session_id request.cookies['JSESSIONID'] end
validation_error()
click to toggle source
# File lib/fake_bsmobil/api.rb, line 22 def validation_error { error_message: 'Some of the data entered are invalid or a required field is empty. Please check the data and try again.', code: '' } end