bankscrap-bbva-net-cash 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbcd07b15419ce680a0c2829917d370dd832419f
4
- data.tar.gz: 900676d73e0aaa89036775d15f3b2a80110c522e
3
+ metadata.gz: d3e86fe50593bd4b4d75e2a829e02f4af897c102
4
+ data.tar.gz: 5160c0e964f8510bc912ff94002d54d073d7c53b
5
5
  SHA512:
6
- metadata.gz: 7a818e4de058a58b831613dd7c7ec00904b02f8c1eab4b1bdb5bc166521ff0dbf08661136257d9adcd5e24c706b9971c9a7527af6c750c640471e5297ac6567c
7
- data.tar.gz: 879692f2eb09c00a1b05c5baf8d7dede32097aac6b88c2887a4884b05aff44d1f70012ec001e1655831270a4155c32f458f35ab3185015a09d4d0fd390aa3ad4
6
+ metadata.gz: 770a00bb76c513d3da87ef85eea0908b75c90f1bc61b06db22f1f161e1bb2f7e5f3bf917b8cc425b6d2f0949ffd2eb9549b7a5a835aaa165bc0aee448225cefe
7
+ data.tar.gz: ccb25a540049b8a32411e6b8faa659b630bd987ae0673bcd104a4814da9dc534c45914dca14cc9832459af2a1dcd622eae6f0484a60c1ab9b5ea4a9ef984fa03
@@ -110,17 +110,25 @@ module Bankscrap
110
110
  loop do
111
111
  json = JSON.parse(post(url, fields: params.to_json))['respuestamovimientos']
112
112
 
113
- unless json['movimientos'].blank?
114
- transactions += json['movimientos'].map do |data|
115
- build_transaction(data, account)
113
+ if json['movimientos'].is_a?(Array)
114
+ unless json['movimientos'].blank?
115
+ transactions += json['movimientos'].map do |data|
116
+ build_transaction(data, account)
117
+ end
118
+
119
+ params['peticionMovimientosKYOS']['paginacionMOVDIA'] = json['paginacionMOVDIA']
120
+ params['peticionMovimientosKYOS']['paginacionTLSMT016'] = json['paginacionTLSMT016']
121
+ params['peticionMovimientosKYOS']['paginacionTLSMT017'] = json['paginacionTLSMT017']
116
122
  end
117
-
118
- params['peticionMovimientosKYOS']['paginacionMOVDIA'] = json['paginacionMOVDIA']
119
- params['peticionMovimientosKYOS']['paginacionTLSMT016'] = json['paginacionTLSMT016']
120
- params['peticionMovimientosKYOS']['paginacionTLSMT017'] = json['paginacionTLSMT017']
123
+ break unless (json['descripcion'] == 'More records available')
124
+ elsif json['movimientos'].is_a?(Hash)
125
+ # There was only 1 transaction for this query
126
+ transactions << build_transaction(json['movimientos'], account)
127
+ break
128
+ else
129
+ # No transactions
130
+ break
121
131
  end
122
-
123
- break unless json['descripcion'] == 'More records available'
124
132
  end
125
133
  end
126
134
 
@@ -1,5 +1,5 @@
1
1
  module Bankscrap
2
2
  module BBVANetCash
3
- VERSION = '1.0.0'.freeze
3
+ VERSION = '1.0.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bankscrap-bbva-net-cash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Cuevas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-01 00:00:00.000000000 Z
11
+ date: 2016-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bankscrap
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  requirements: []
91
91
  rubyforge_project:
92
- rubygems_version: 2.6.4
92
+ rubygems_version: 2.4.8
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: BBVA Net Cash adapter for Bankscrap