biro 0.4.1 → 0.5.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce870fe733cb5c7dca7449dd5cda540b11e6e1e4
|
|
4
|
+
data.tar.gz: 5e5b9f929a45ba1f3cdc09a7add1e5d8d64a03f3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6eec94535e8da276edc96e0f3abf79882346763b8054d50d1fc4b91abbe85a715eaa2850cc533470e40a050a31e58e28e20e049792985f1bc9d993c1287cbcdf
|
|
7
|
+
data.tar.gz: 5184c9445acc8df73b4801d9dbc10bbdfc6cbbbb51c6a6e5015064367ddf363cc7ec8ba4bc5906847076365746c62bb38ded367adc9c4d604c6d896fba0a9e9f
|
|
@@ -36,9 +36,18 @@ module Biro
|
|
|
36
36
|
|
|
37
37
|
Array.wrap(result.dig(:lista_de_resumo_das_operacoes)).map do |item|
|
|
38
38
|
{
|
|
39
|
-
:
|
|
40
|
-
:
|
|
41
|
-
:
|
|
39
|
+
:tax_variation => item[:variacao_cambial],
|
|
40
|
+
:modality => item[:modalidade],
|
|
41
|
+
:dues_list => invoice_list_item(item[:lista_de_vencimentos])
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def invoice_list_item(items)
|
|
47
|
+
Array.wrap(items).map do |item|
|
|
48
|
+
{
|
|
49
|
+
:code => item[:codigo_vencimento],
|
|
50
|
+
:value => item[:valor_vencimento]
|
|
42
51
|
}
|
|
43
52
|
end
|
|
44
53
|
end
|
|
@@ -31,6 +31,10 @@ module Biro
|
|
|
31
31
|
|
|
32
32
|
private
|
|
33
33
|
|
|
34
|
+
def savon_options
|
|
35
|
+
{ strip_namespaces: false }
|
|
36
|
+
end
|
|
37
|
+
|
|
34
38
|
def verify_response responses
|
|
35
39
|
raise AuthenticationError.new("Error at Midia100 request: #{responses[:registration].body[:consultar_response][:consultar_result]}") if responses[:registration]&.body[:consultar_response][:consultar_result]&.include? "Usuário ou Senha Estão Incorretos"
|
|
36
40
|
raise DocumentNotFoundError.new("Error at Midia100 request: #{responses[:registration].body[:consultar_response][:consultar_result]}") if responses[:registration]&.body[:consultar_response][:consultar_result]&.include? "Cpf Inválido"
|
|
@@ -159,7 +159,7 @@ module Biro
|
|
|
159
159
|
end
|
|
160
160
|
|
|
161
161
|
def result(data)
|
|
162
|
-
Nori.new.parse(data[:consultar_response][:consultar_result])['NewDataSet'] unless data.nil?
|
|
162
|
+
Nori.new(convert_attributes_to: ->(key, value) { [] }).parse(data[:consultar_response][:consultar_result])['NewDataSet'] unless data.nil?
|
|
163
163
|
end
|
|
164
164
|
end
|
|
165
165
|
end
|
data/lib/biro/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: biro
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Noverde Team
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: exe
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2017-07-
|
|
14
|
+
date: 2017-07-26 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: savon
|
|
@@ -145,7 +145,6 @@ files:
|
|
|
145
145
|
- Rakefile
|
|
146
146
|
- bin/console
|
|
147
147
|
- bin/setup
|
|
148
|
-
- biro-0.4.0.gem
|
|
149
148
|
- biro.gemspec
|
|
150
149
|
- lib/biro.rb
|
|
151
150
|
- lib/biro/configuration.rb
|
data/biro-0.4.0.gem
DELETED
|
Binary file
|