vpos 1.0.2 → 1.0.3
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/Gemfile.lock +16 -14
- data/lib/vpos/version.rb +1 -1
- data/lib/vpos.rb +3 -6
- data/lib/vpos_module.rb +1 -10
- data/vpos.gemspec +4 -3
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8370f4a90ad50fe5d01bfac9624ab58308ed93162e89f812d3c079666bcfe34d
|
4
|
+
data.tar.gz: 52eaab59d6381acd36fe3123838e044eb245d233d6dee5a512e37023e66b4287
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c58b139c3f768eebe04c2c97fe5398ce1a9cb94c2e8fbaa04eff8449ff069493b26900c5cb7937beea387b0820fd594293aeed96f27d86b693bf28e04946fb54
|
7
|
+
data.tar.gz: bc3e0f3b9991fa73dbe7002bb73d14cbb3e52a6d3d0d2e4b632962784081da33ebf3113504f934478cc86f16e0c1e5f3d12c7f9ced3756d181cb600ab0831534
|
data/Gemfile.lock
CHANGED
@@ -1,35 +1,37 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
vpos (1.0.
|
4
|
+
vpos (1.0.2)
|
5
|
+
concurrent-ruby
|
5
6
|
httparty (~> 0.18.1)
|
6
7
|
rspec (~> 3.9, >= 3.9.0)
|
7
8
|
|
8
9
|
GEM
|
9
10
|
remote: https://rubygems.org/
|
10
11
|
specs:
|
12
|
+
concurrent-ruby (1.1.9)
|
11
13
|
diff-lcs (1.4.4)
|
12
14
|
httparty (0.18.1)
|
13
15
|
mime-types (~> 3.0)
|
14
16
|
multi_xml (>= 0.5.2)
|
15
17
|
mime-types (3.3.1)
|
16
18
|
mime-types-data (~> 3.2015)
|
17
|
-
mime-types-data (3.
|
19
|
+
mime-types-data (3.2021.0901)
|
18
20
|
multi_xml (0.6.0)
|
19
21
|
rake (12.3.3)
|
20
|
-
rspec (3.
|
21
|
-
rspec-core (~> 3.
|
22
|
-
rspec-expectations (~> 3.
|
23
|
-
rspec-mocks (~> 3.
|
24
|
-
rspec-core (3.
|
25
|
-
rspec-support (~> 3.
|
26
|
-
rspec-expectations (3.
|
22
|
+
rspec (3.10.0)
|
23
|
+
rspec-core (~> 3.10.0)
|
24
|
+
rspec-expectations (~> 3.10.0)
|
25
|
+
rspec-mocks (~> 3.10.0)
|
26
|
+
rspec-core (3.10.1)
|
27
|
+
rspec-support (~> 3.10.0)
|
28
|
+
rspec-expectations (3.10.1)
|
27
29
|
diff-lcs (>= 1.2.0, < 2.0)
|
28
|
-
rspec-support (~> 3.
|
29
|
-
rspec-mocks (3.
|
30
|
+
rspec-support (~> 3.10.0)
|
31
|
+
rspec-mocks (3.10.2)
|
30
32
|
diff-lcs (>= 1.2.0, < 2.0)
|
31
|
-
rspec-support (~> 3.
|
32
|
-
rspec-support (3.
|
33
|
+
rspec-support (~> 3.10.0)
|
34
|
+
rspec-support (3.10.2)
|
33
35
|
|
34
36
|
PLATFORMS
|
35
37
|
ruby
|
@@ -40,4 +42,4 @@ DEPENDENCIES
|
|
40
42
|
vpos!
|
41
43
|
|
42
44
|
BUNDLED WITH
|
43
|
-
2.2.
|
45
|
+
2.2.27
|
data/lib/vpos/version.rb
CHANGED
data/lib/vpos.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
require_relative "vpos_module"
|
2
|
+
require "concurrent"
|
2
3
|
|
3
4
|
class Vpos
|
4
5
|
include VposModule
|
6
|
+
include Concurrent::Async
|
5
7
|
|
6
|
-
def initialize(
|
7
|
-
@environment = environment
|
8
|
+
def initialize(token: set_token, pos_id: default_pos_id, supervisor_card: default_supervisor_card, payment_callback_url: default_payment_callback_url, refund_callback_url: default_refund_callback_url)
|
8
9
|
@token = token
|
9
10
|
@pos_id = pos_id
|
10
11
|
@supervisor_card = supervisor_card
|
@@ -36,8 +37,4 @@ class Vpos
|
|
36
37
|
def default_refund_callback_url
|
37
38
|
ENV['REFUND_CALLBACK_URL']
|
38
39
|
end
|
39
|
-
|
40
|
-
def default_environment
|
41
|
-
ENV['VPOS_PROFILE']
|
42
|
-
end
|
43
40
|
end
|
data/lib/vpos_module.rb
CHANGED
@@ -26,11 +26,6 @@ module VposModule
|
|
26
26
|
return_vpos_object(request)
|
27
27
|
end
|
28
28
|
|
29
|
-
def get_transactions
|
30
|
-
request = HTTParty.get("#{host}/transactions", set_headers)
|
31
|
-
return_vpos_object(request)
|
32
|
-
end
|
33
|
-
|
34
29
|
def get_request_id(response)
|
35
30
|
if response[:location].nil?
|
36
31
|
HTTParty.get("#{host}/references/invalid", set_headers)
|
@@ -68,10 +63,6 @@ module VposModule
|
|
68
63
|
end
|
69
64
|
|
70
65
|
def host
|
71
|
-
|
72
|
-
"https://api.vpos.ao/api/v1"
|
73
|
-
else
|
74
|
-
"https://sandbox.vpos.ao/api/v1"
|
75
|
-
end
|
66
|
+
"https://api.vpos.ao/api/v1"
|
76
67
|
end
|
77
68
|
end
|
data/vpos.gemspec
CHANGED
@@ -22,8 +22,9 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.add_development_dependency
|
25
|
+
spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.3'
|
26
26
|
spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
|
27
|
-
spec.add_dependency
|
28
|
-
spec.add_dependency
|
27
|
+
spec.add_dependency 'httparty', '~> 0.18.1'
|
28
|
+
spec.add_dependency 'concurrent-ruby'
|
29
|
+
spec.add_dependency 'rspec', '~> 3.9', ">= 3.9.0"
|
29
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vpos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Maziano
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -64,6 +64,20 @@ dependencies:
|
|
64
64
|
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: 0.18.1
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: concurrent-ruby
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
type: :runtime
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
67
81
|
- !ruby/object:Gem::Dependency
|
68
82
|
name: rspec
|
69
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -111,7 +125,7 @@ homepage: https://github.com/v-pos/vpos-ruby
|
|
111
125
|
licenses:
|
112
126
|
- MIT
|
113
127
|
metadata: {}
|
114
|
-
post_install_message:
|
128
|
+
post_install_message:
|
115
129
|
rdoc_options: []
|
116
130
|
require_paths:
|
117
131
|
- lib
|
@@ -126,9 +140,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
140
|
- !ruby/object:Gem::Version
|
127
141
|
version: '0'
|
128
142
|
requirements: []
|
129
|
-
rubyforge_project:
|
143
|
+
rubyforge_project:
|
130
144
|
rubygems_version: 2.7.6.2
|
131
|
-
signing_key:
|
145
|
+
signing_key:
|
132
146
|
specification_version: 4
|
133
147
|
summary: The one stop shop for online payments in Angola.
|
134
148
|
test_files: []
|