Module: Iwoca

Defined in:
lib/iwoca/application_generator.rb,
lib/iwoca.rb,
lib/iwoca/version.rb,
lib/iwoca/customer.rb,
lib/iwoca/response.rb,
lib/iwoca/webhooks.rb,
lib/iwoca/connection.rb,
lib/iwoca/application.rb,
lib/iwoca/configuration.rb,
lib/iwoca/path_sanitizer.rb,
lib/iwoca/customer_generator.rb

Overview

frozen_string_literal

Defined Under Namespace

Classes: Application, ApplicationGenerator, Configuration, Connection, Customer, CustomerGenerator, PathSanitizer, Response, Webhooks

Constant Summary collapse

VERSION =
'1.1.3'

Class Method Summary collapse

Class Method Details

.authentication_checkObject



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/iwoca.rb', line 27

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

.configurationObject



19
20
21
# File 'lib/iwoca.rb', line 19

def configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Yields:



39
40
41
# File 'lib/iwoca.rb', line 39

def configure
  yield(configuration)
end

.connectionObject



23
24
25
# File 'lib/iwoca.rb', line 23

def connection
  @connection ||= Connection.new
end

.rootObject



15
16
17
# File 'lib/iwoca.rb', line 15

def root
  File.dirname(__dir__)
end