bckbn 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +15 -17
- data/lib/bckbn/resources/transaction/api.rb +40 -46
- data/lib/bckbn/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17f59a2d0a76520c2ce364ef1bcfd8ca46e9a20f51026cb2613f9d66482ae278
|
4
|
+
data.tar.gz: 51458c020327baffec1803bb3dc0fe6b8e890c771a9dd4cd7d604940b26f0aed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63c67a32658b11f8b6f05cae841cf3feca56863a9528c158b29ec74e852f259f7fa0832112dbc0bdf611132d2207a7b9dcc8762ac972ab247194b1b4c5ac9dcd
|
7
|
+
data.tar.gz: f5fe4a59cd73013bef9277a4c3f5255a6a89e934fa25fe643d4f5747d8e310a06f1865ffcb80d71c97a8d7affdb4ec2fcb7b942197a22da581def1465063429d
|
data/Gemfile.lock
CHANGED
@@ -1,41 +1,40 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bckbn (2.1.
|
4
|
+
bckbn (2.1.1)
|
5
5
|
addressable (~> 2.8.5)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
addressable (2.8.
|
10
|
+
addressable (2.8.6)
|
11
11
|
public_suffix (>= 2.0.2, < 6.0)
|
12
12
|
ast (2.4.2)
|
13
|
-
base64 (0.1.1)
|
14
13
|
coderay (1.1.3)
|
15
14
|
concurrent-ruby (1.2.2)
|
16
15
|
crack (0.4.5)
|
17
16
|
rexml
|
18
17
|
diff-lcs (1.5.0)
|
19
|
-
faker (3.2.
|
18
|
+
faker (3.2.2)
|
20
19
|
i18n (>= 1.8.11, < 2)
|
21
|
-
hashdiff (1.0
|
20
|
+
hashdiff (1.1.0)
|
22
21
|
i18n (1.14.1)
|
23
22
|
concurrent-ruby (~> 1.0)
|
24
|
-
json (2.
|
23
|
+
json (2.7.1)
|
25
24
|
language_server-protocol (3.17.0.3)
|
26
25
|
method_source (1.0.0)
|
27
|
-
parallel (1.
|
28
|
-
parser (3.
|
26
|
+
parallel (1.24.0)
|
27
|
+
parser (3.3.0.2)
|
29
28
|
ast (~> 2.4.1)
|
30
29
|
racc
|
31
30
|
pry (0.14.2)
|
32
31
|
coderay (~> 1.1)
|
33
32
|
method_source (~> 1.0)
|
34
|
-
public_suffix (5.0.
|
35
|
-
racc (1.7.
|
33
|
+
public_suffix (5.0.4)
|
34
|
+
racc (1.7.3)
|
36
35
|
rainbow (3.1.1)
|
37
|
-
rake (13.0
|
38
|
-
regexp_parser (2.
|
36
|
+
rake (13.1.0)
|
37
|
+
regexp_parser (2.9.0)
|
39
38
|
rexml (3.2.6)
|
40
39
|
rspec (3.12.0)
|
41
40
|
rspec-core (~> 3.12.0)
|
@@ -50,19 +49,18 @@ GEM
|
|
50
49
|
diff-lcs (>= 1.2.0, < 2.0)
|
51
50
|
rspec-support (~> 3.12.0)
|
52
51
|
rspec-support (3.12.1)
|
53
|
-
rubocop (1.
|
54
|
-
base64 (~> 0.1.1)
|
52
|
+
rubocop (1.59.0)
|
55
53
|
json (~> 2.3)
|
56
54
|
language_server-protocol (>= 3.17.0)
|
57
55
|
parallel (~> 1.10)
|
58
|
-
parser (>= 3.2.2.
|
56
|
+
parser (>= 3.2.2.4)
|
59
57
|
rainbow (>= 2.2.2, < 4.0)
|
60
58
|
regexp_parser (>= 1.8, < 3.0)
|
61
59
|
rexml (>= 3.2.5, < 4.0)
|
62
|
-
rubocop-ast (>= 1.
|
60
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
63
61
|
ruby-progressbar (~> 1.7)
|
64
62
|
unicode-display_width (>= 2.4.0, < 3.0)
|
65
|
-
rubocop-ast (1.
|
63
|
+
rubocop-ast (1.30.0)
|
66
64
|
parser (>= 3.2.1.0)
|
67
65
|
ruby-progressbar (1.13.0)
|
68
66
|
unicode-display_width (2.5.0)
|
@@ -14,52 +14,46 @@ module Bckbn
|
|
14
14
|
}.freeze
|
15
15
|
private_constant :ENDPOINTS
|
16
16
|
|
17
|
-
|
18
|
-
body =
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
body =
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
body =
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
end
|
58
|
-
|
59
|
-
def self.echeck_void(body, config = {})
|
60
|
-
body = EcheckVoidRequest.new(body)
|
61
|
-
@conn = Bckbn::Connection.new(config)
|
62
|
-
@conn.post_to_api(ENDPOINTS.fetch(__method__), body.to_h, EcheckVoidResponse)
|
17
|
+
class << self
|
18
|
+
def authorization(body, config = {})
|
19
|
+
process_transaction(__method__, body, config, AuthorizationRequest, AuthorizationResponse)
|
20
|
+
end
|
21
|
+
|
22
|
+
def capture(body, config = {})
|
23
|
+
process_transaction(__method__, body, config, CaptureRequest, CaptureResponse)
|
24
|
+
end
|
25
|
+
|
26
|
+
def credit(body, config = {})
|
27
|
+
process_transaction(__method__, body, config, CreditRequest, CreditResponse)
|
28
|
+
end
|
29
|
+
|
30
|
+
def sale(body, config = {})
|
31
|
+
process_transaction(__method__, body, config, SaleRequest, SaleResponse)
|
32
|
+
end
|
33
|
+
|
34
|
+
def void(body, config = {})
|
35
|
+
process_transaction(__method__, body, config, VoidRequest, VoidResponse)
|
36
|
+
end
|
37
|
+
|
38
|
+
def echeck_credit(body, config = {})
|
39
|
+
process_transaction(__method__, body, config, EcheckCreditRequest, EcheckCreditResponse)
|
40
|
+
end
|
41
|
+
|
42
|
+
def echeck_sale(body, config = {})
|
43
|
+
process_transaction(__method__, body, config, EcheckSaleRequest, EcheckSaleResponse)
|
44
|
+
end
|
45
|
+
|
46
|
+
def echeck_void(body, config = {})
|
47
|
+
process_transaction(__method__, body, config, EcheckVoidRequest, EcheckVoidResponse)
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
def process_transaction(method, body, config, request_klass, response_klass)
|
53
|
+
request = request_klass.new(body)
|
54
|
+
conn = Bckbn::Connection.new(config)
|
55
|
+
conn.post_to_api(ENDPOINTS.fetch(method), request.to_h, response_klass)
|
56
|
+
end
|
63
57
|
end
|
64
58
|
end
|
65
59
|
end
|
data/lib/bckbn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bckbn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nikkypx
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|