bs2_api 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/Gemfile.lock +4 -4
- data/lib/bs2_api/entities/payment.rb +6 -3
- data/lib/bs2_api/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 175c6176282d4442f464f85434429c42278b5fd0553cd2a4ac03fc65fe813096
|
4
|
+
data.tar.gz: 6a5edaca9bc8aefcebd1a00699faaf0615c44816290cf0c87e4d14a4a4d74bc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11ed0de57717ada3d4cc18e9859c8d323eca009fea97086bbee877e1052ced9bc8c2e014cb9cd1c7478a0a61852653e1c7c563a8cbfd518a8a81e6e45dfed6db
|
7
|
+
data.tar.gz: e95bc5444784271372d3d2be1e3246ac47cf81a9667cbe7c3fe668490fa5171234dbbf69ab02c95fe54b5cf5a3113d7561684dc64977779408cbc24b3c19326b
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bs2_api (1.2.
|
4
|
+
bs2_api (1.2.1)
|
5
5
|
activesupport
|
6
6
|
builder
|
7
7
|
bundler
|
@@ -11,7 +11,7 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activesupport (7.0.
|
14
|
+
activesupport (7.0.3)
|
15
15
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
16
|
i18n (>= 1.6, < 2)
|
17
17
|
minitest (>= 5.1)
|
@@ -21,7 +21,7 @@ GEM
|
|
21
21
|
builder (3.2.4)
|
22
22
|
byebug (11.1.3)
|
23
23
|
coderay (1.1.3)
|
24
|
-
concurrent-ruby (1.1.
|
24
|
+
concurrent-ruby (1.1.10)
|
25
25
|
crack (0.4.5)
|
26
26
|
rexml
|
27
27
|
diff-lcs (1.4.4)
|
@@ -30,7 +30,7 @@ GEM
|
|
30
30
|
httparty (0.18.1)
|
31
31
|
mime-types (~> 3.0)
|
32
32
|
multi_xml (>= 0.5.2)
|
33
|
-
i18n (1.
|
33
|
+
i18n (1.10.0)
|
34
34
|
concurrent-ruby (~> 1.0)
|
35
35
|
macaddr (1.7.2)
|
36
36
|
systemu (~> 2.6.5)
|
@@ -3,19 +3,21 @@
|
|
3
3
|
module Bs2Api
|
4
4
|
module Entities
|
5
5
|
class Payment
|
6
|
-
attr_accessor :payment_id, :end_to_end_id, :receiver, :payer
|
6
|
+
attr_accessor :payment_id, :end_to_end_id, :receiver, :payer, :status
|
7
7
|
|
8
8
|
def initialize(args = {})
|
9
9
|
@payment_id = args.fetch(:payment_id, nil)
|
10
10
|
@end_to_end_id = args.fetch(:end_to_end_id, nil)
|
11
11
|
@receiver = args.fetch(:receiver, nil)
|
12
12
|
@payer = args.fetch(:payer, nil)
|
13
|
+
@status = args.fetch(:status, nil)
|
13
14
|
end
|
14
15
|
|
15
16
|
def to_hash
|
16
17
|
hash_data = {
|
17
18
|
"pagamentoId": @payment_id,
|
18
|
-
"endToEndId": @end_to_end_id
|
19
|
+
"endToEndId": @end_to_end_id,
|
20
|
+
"status": @status
|
19
21
|
}
|
20
22
|
|
21
23
|
hash_data.merge!({ "recebedor": @receiver.to_hash } ) if @receiver.present?
|
@@ -30,7 +32,8 @@ module Bs2Api
|
|
30
32
|
payment_id: hash["pagamentoId"] || hash["cobranca"]["id"],
|
31
33
|
end_to_end_id: hash["endToEndId"],
|
32
34
|
receiver: Bs2Api::Entities::Bank.from_response(hash["recebedor"]),
|
33
|
-
payer: Bs2Api::Entities::Bank.from_response(hash["pagador"])
|
35
|
+
payer: Bs2Api::Entities::Bank.from_response(hash["pagador"]),
|
36
|
+
status: hash["status"]
|
34
37
|
)
|
35
38
|
end
|
36
39
|
end
|
data/lib/bs2_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bs2_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kim Pastro
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -230,7 +230,7 @@ metadata:
|
|
230
230
|
homepage_uri: https://github.com/latamgateway/bs2_api
|
231
231
|
source_code_uri: https://github.com/latamgateway/bs2_api
|
232
232
|
changelog_uri: https://github.com/latamgateway/bs2_api/blob/main/CHANGELOG.md
|
233
|
-
post_install_message:
|
233
|
+
post_install_message:
|
234
234
|
rdoc_options: []
|
235
235
|
require_paths:
|
236
236
|
- lib
|
@@ -249,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
249
|
version: '0'
|
250
250
|
requirements: []
|
251
251
|
rubygems_version: 3.1.4
|
252
|
-
signing_key:
|
252
|
+
signing_key:
|
253
253
|
specification_version: 4
|
254
254
|
summary: Integração com a API do BS2
|
255
255
|
test_files: []
|