lib/iwoca.rb in iwoca-1.0.1 vs lib/iwoca.rb in iwoca-1.1.0

- old
+ new

@@ -2,20 +2,35 @@ require 'iwoca/version' require 'iwoca/path_sanitizer' require 'iwoca/configuration' require 'iwoca/connection' -require 'iwoca/quote' +require 'iwoca/customer' +require 'iwoca/application' +require 'iwoca/webhooks' +require 'rainbow' module Iwoca module_function def configuration @configuration ||= Configuration.new end def connection @connection ||= Connection.new + end + + def authentication_check + response = connection.get('/authentication_check/') + + if response.success? + puts Rainbow("Authentication check successful: #{response.body.to_json}").green.bright + else + puts Rainbow("Authentication check failed: #{response.body.to_json}").red.bright + end + + response.success? end def configure yield(configuration) end