conexa 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +207 -1
- data/README.md +35 -3
- data/README_pt-BR.md +35 -1
- data/REFERENCE.md +29 -1
- data/lib/conexa/configuration.rb +48 -2
- data/lib/conexa/errors.rb +79 -7
- data/lib/conexa/model.rb +77 -14
- data/lib/conexa/object.rb +24 -3
- data/lib/conexa/request.rb +90 -11
- data/lib/conexa/resources/charge.rb +13 -2
- data/lib/conexa/resources/company.rb +20 -1
- data/lib/conexa/resources/contract.rb +89 -15
- data/lib/conexa/resources/credit_card.rb +46 -0
- data/lib/conexa/resources/recurring_sale.rb +16 -5
- data/lib/conexa/resources/result.rb +23 -5
- data/lib/conexa/util.rb +46 -9
- data/lib/conexa/version.rb +1 -1
- data/lib/conexa.rb +38 -3
- metadata +27 -70
- data/.editorconfig +0 -30
- data/.rspec +0 -3
- data/.rubocop.yml +0 -13
- data/.solargraph.yml +0 -2
- data/.vscode/launch.json +0 -30
- data/Gemfile +0 -18
- data/Gemfile.lock +0 -159
- data/Rakefile +0 -12
- data/bin/console +0 -61
- data/bin/setup +0 -8
- data/docs/postman-collection.json +0 -30785
- data/lib/conexa/authenticator.rb +0 -116
- data/lib/conexa/order_common.rb +0 -44
- data/lib/conexa/token_manager.rb +0 -136
- data/scripts/extract_fixtures.rb +0 -35
data/bin/console
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
require "irb"
|
|
5
|
-
require "irb/completion"
|
|
6
|
-
require "bundler/setup"
|
|
7
|
-
require "conexa"
|
|
8
|
-
require "factory_bot"
|
|
9
|
-
require "faker"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
13
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
14
|
-
|
|
15
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
16
|
-
# require "pry"
|
|
17
|
-
# Pry.start
|
|
18
|
-
|
|
19
|
-
# Config IRB to enable --simple-prompt and auto indent
|
|
20
|
-
IRB.conf[:PROMPT_MODE] = :SIMPLE
|
|
21
|
-
IRB.conf[:AUTO_INDENT] = true
|
|
22
|
-
include FactoryBot::Syntax::Methods
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
FactoryBot.find_definitions
|
|
26
|
-
FactoryBot.reload
|
|
27
|
-
Faker::Config.locale = 'pt-BR'
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
def reload!(print = true)
|
|
31
|
-
puts 'Reloading ...' if print
|
|
32
|
-
# Main project directory.
|
|
33
|
-
root_dir = File.expand_path('..', __dir__)
|
|
34
|
-
# Directories within the project that should be reloaded.
|
|
35
|
-
reload_dirs = %w{lib}
|
|
36
|
-
# Loop through and reload every file in all relevant project directories.
|
|
37
|
-
reload_dirs.each do |dir|
|
|
38
|
-
Dir.glob("#{root_dir}/#{dir}/**/*.rb").each { |f| load(f) }
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
FactoryBot.reload
|
|
42
|
-
|
|
43
|
-
# Return true when complete.
|
|
44
|
-
true
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def initialize_conexa
|
|
48
|
-
pp "Initilizing..."
|
|
49
|
-
|
|
50
|
-
Conexa.configure do |config|
|
|
51
|
-
config.api_token = ENV['API_TOKEN']
|
|
52
|
-
config.api_host = ENV['API_HOST']
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
pp Conexa.configuration
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
initialize_conexa
|
|
61
|
-
IRB.start
|