fintecture 0.1.9 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +19 -16
- data/.rspec +3 -3
- data/.travis.yml +7 -7
- data/CODE_OF_CONDUCT.md +74 -74
- data/Gemfile +5 -5
- data/Gemfile.lock +59 -40
- data/LICENSE.txt +674 -674
- data/README.md +238 -152
- data/Rakefile +6 -6
- data/bin/console +14 -14
- data/bin/setup +8 -8
- data/fintecture.gemspec +43 -43
- data/lib/fintecture/api/base_url.rb +28 -27
- data/lib/fintecture/api/endpoints/authentication.rb +12 -12
- data/lib/fintecture/api/endpoints/pis.rb +13 -12
- data/lib/fintecture/authentication.rb +75 -75
- data/lib/fintecture/connect.rb +37 -219
- data/lib/fintecture/exceptions.rb +32 -3
- data/lib/fintecture/faraday/authentication/connection.rb +120 -74
- data/lib/fintecture/pis.rb +261 -60
- data/lib/fintecture/utils/constants.rb +13 -13
- data/lib/fintecture/utils/crypto.rb +77 -75
- data/lib/fintecture/utils/date.rb +14 -14
- data/lib/fintecture/utils/validation.rb +25 -25
- data/lib/fintecture/version.rb +3 -3
- data/lib/fintecture.rb +81 -81
- metadata +6 -6
data/lib/fintecture.rb
CHANGED
@@ -1,82 +1,82 @@
|
|
1
|
-
require 'logger'
|
2
|
-
require 'uri'
|
3
|
-
require 'faraday'
|
4
|
-
|
5
|
-
#ToRemove
|
6
|
-
require 'openssl'
|
7
|
-
require 'cgi'
|
8
|
-
|
9
|
-
# Version
|
10
|
-
require 'fintecture/version'
|
11
|
-
|
12
|
-
# Modules
|
13
|
-
require 'fintecture/connect'
|
14
|
-
require 'fintecture/authentication'
|
15
|
-
|
16
|
-
# Utilities
|
17
|
-
require 'fintecture/utils/crypto'
|
18
|
-
|
19
|
-
# Endpoints
|
20
|
-
require 'fintecture/api/base_url'
|
21
|
-
require 'fintecture/api/endpoints/authentication'
|
22
|
-
|
23
|
-
# Connections
|
24
|
-
require 'fintecture/faraday/authentication/connection'
|
25
|
-
|
26
|
-
|
27
|
-
module Fintecture
|
28
|
-
@log_level = nil
|
29
|
-
@logger = nil
|
30
|
-
@environment = 'sandbox'
|
31
|
-
|
32
|
-
ENVIRONMENTS = %w[local test sandbox production].freeze
|
33
|
-
|
34
|
-
class << self
|
35
|
-
attr_accessor :app_id, :app_secret, :private_key
|
36
|
-
|
37
|
-
def environment=(environment)
|
38
|
-
environment = environment.downcase
|
39
|
-
|
40
|
-
raise "#{environment} not a valid environment, options are [#{ENVIRONMENTS.join(', ')}]" unless ENVIRONMENTS.include?(environment)
|
41
|
-
|
42
|
-
@environment = environment
|
43
|
-
end
|
44
|
-
|
45
|
-
def environment
|
46
|
-
@environment
|
47
|
-
end
|
48
|
-
|
49
|
-
# Logging
|
50
|
-
LEVEL_DEBUG = Logger::DEBUG
|
51
|
-
LEVEL_ERROR = Logger::ERROR
|
52
|
-
LEVEL_INFO = Logger::INFO
|
53
|
-
|
54
|
-
def log_level
|
55
|
-
@log_level
|
56
|
-
end
|
57
|
-
|
58
|
-
def log_level=(val)
|
59
|
-
if val == "debug"
|
60
|
-
val = LEVEL_DEBUG
|
61
|
-
elsif val == "info"
|
62
|
-
val = LEVEL_INFO
|
63
|
-
end
|
64
|
-
|
65
|
-
if !val.nil? && ![LEVEL_DEBUG, LEVEL_ERROR, LEVEL_INFO].include?(val)
|
66
|
-
raise ArgumentError, 'log_level should only be set to `nil`, `debug` or `info`'
|
67
|
-
end
|
68
|
-
@log_level = val
|
69
|
-
end
|
70
|
-
|
71
|
-
def logger
|
72
|
-
@logger
|
73
|
-
end
|
74
|
-
|
75
|
-
def logger=(val)
|
76
|
-
@logger = val
|
77
|
-
end
|
78
|
-
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
1
|
+
require 'logger'
|
2
|
+
require 'uri'
|
3
|
+
require 'faraday'
|
4
|
+
|
5
|
+
#ToRemove
|
6
|
+
require 'openssl'
|
7
|
+
require 'cgi'
|
8
|
+
|
9
|
+
# Version
|
10
|
+
require 'fintecture/version'
|
11
|
+
|
12
|
+
# Modules
|
13
|
+
require 'fintecture/connect'
|
14
|
+
require 'fintecture/authentication'
|
15
|
+
|
16
|
+
# Utilities
|
17
|
+
require 'fintecture/utils/crypto'
|
18
|
+
|
19
|
+
# Endpoints
|
20
|
+
require 'fintecture/api/base_url'
|
21
|
+
require 'fintecture/api/endpoints/authentication'
|
22
|
+
|
23
|
+
# Connections
|
24
|
+
require 'fintecture/faraday/authentication/connection'
|
25
|
+
|
26
|
+
|
27
|
+
module Fintecture
|
28
|
+
@log_level = nil
|
29
|
+
@logger = nil
|
30
|
+
@environment = 'sandbox'
|
31
|
+
|
32
|
+
ENVIRONMENTS = %w[local test sandbox production].freeze
|
33
|
+
|
34
|
+
class << self
|
35
|
+
attr_accessor :app_id, :app_secret, :private_key
|
36
|
+
|
37
|
+
def environment=(environment)
|
38
|
+
environment = environment.downcase
|
39
|
+
|
40
|
+
raise "#{environment} not a valid environment, options are [#{ENVIRONMENTS.join(', ')}]" unless ENVIRONMENTS.include?(environment)
|
41
|
+
|
42
|
+
@environment = environment
|
43
|
+
end
|
44
|
+
|
45
|
+
def environment
|
46
|
+
@environment
|
47
|
+
end
|
48
|
+
|
49
|
+
# Logging
|
50
|
+
LEVEL_DEBUG = Logger::DEBUG
|
51
|
+
LEVEL_ERROR = Logger::ERROR
|
52
|
+
LEVEL_INFO = Logger::INFO
|
53
|
+
|
54
|
+
def log_level
|
55
|
+
@log_level
|
56
|
+
end
|
57
|
+
|
58
|
+
def log_level=(val)
|
59
|
+
if val == "debug"
|
60
|
+
val = LEVEL_DEBUG
|
61
|
+
elsif val == "info"
|
62
|
+
val = LEVEL_INFO
|
63
|
+
end
|
64
|
+
|
65
|
+
if !val.nil? && ![LEVEL_DEBUG, LEVEL_ERROR, LEVEL_INFO].include?(val)
|
66
|
+
raise ArgumentError, 'log_level should only be set to `nil`, `debug` or `info`'
|
67
|
+
end
|
68
|
+
@log_level = val
|
69
|
+
end
|
70
|
+
|
71
|
+
def logger
|
72
|
+
@logger
|
73
|
+
end
|
74
|
+
|
75
|
+
def logger=(val)
|
76
|
+
@logger = val
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
82
|
Fintecture.log_level = ENV["FINTECTURE_LOG"] unless ENV["FINTECTURE_LOG"].nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fintecture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fintecture
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -105,7 +105,7 @@ licenses:
|
|
105
105
|
metadata:
|
106
106
|
homepage_uri: http://fintecture.com
|
107
107
|
source_code_uri: https://github.com/Fintecture/fintecture-sdk-ruby
|
108
|
-
post_install_message:
|
108
|
+
post_install_message:
|
109
109
|
rdoc_options: []
|
110
110
|
require_paths:
|
111
111
|
- lib
|
@@ -120,8 +120,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
|
-
rubygems_version: 3.
|
124
|
-
signing_key:
|
123
|
+
rubygems_version: 3.2.22
|
124
|
+
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: Short summary
|
127
127
|
test_files: []
|