fio_api 0.0.9 → 0.0.11

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
  SHA256:
3
- metadata.gz: 4637e351ea61bdbf29780a6f484476e8263be5f4affcbe7dbe7d559bb828761e
4
- data.tar.gz: 4e32a12e425d4d3a108d58583d0926aaa9931134ea8ae11720412c8487286842
3
+ metadata.gz: d1cdda7932904d6344a35a53d31dda1f67b3bfd8492201493f71b87954057832
4
+ data.tar.gz: fa38b54a98151fca085c139ac3bd98c90290bc3b629eb0c2acb138cfccb8dbe6
5
5
  SHA512:
6
- metadata.gz: 889371500122508ad8dd0167505456b64ae0a6a3d215ae07664b9cca54b1b97f960560c44963f19900d30013fa25b2c2f326dd2e5dc98a7b61b147afefeb7068
7
- data.tar.gz: af0dea8f4d2b1e98422546583aecde601167a07714f1a8afc055ea7b1c004136cb9cfbfdb9b0d7e3525d36eaf98f3f522f9502eb06dd83e039b76f2c6703b0dc
6
+ metadata.gz: 761eb97d08897fe3ffd4fe00be3bb01e36d879657108988d8c068e5a7560c98cbe04e4f9ff04912fff70cab78c172ddbc68d212083a74bc058bbe6d3e0da7ba5
7
+ data.tar.gz: ebe721d04841a4494bee40e31eaa6bb3bfe6b76cfdaad5c872c156c932fd3273a4c2ffc0dc75c6e8ce31054f16dc21cafa7b53825afeef0d1f87b82411c87ad5
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'http://rubygems.org'
2
4
 
3
5
  gem 'httparty', '>= 0.16.2'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.9
1
+ 0.0.11
data/fio_api.gemspec CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "fio_api".freeze
9
- s.version = "0.0.9"
9
+ s.version = "0.0.11"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
@@ -33,6 +33,7 @@ Gem::Specification.new do |s|
33
33
  "lib/base/deserializers/import_response_deserializer.rb",
34
34
  "lib/base/deserializers/list_response_deserializer.rb",
35
35
  "lib/base/list.rb",
36
+ "lib/base/errors/invalid_json_response.rb",
36
37
  "lib/base/payment.rb",
37
38
  "lib/base/payments/domestic.rb",
38
39
  "lib/base/payments/status.rb",
@@ -26,6 +26,8 @@ module FioAPI
26
26
  # New object with account and transactions attributes
27
27
  #
28
28
  def deserialize(json)
29
+ raise FioAPI::InvalidJsonResponse.new(json) if json.is_a?(String)
30
+
29
31
  self.account = deserialize_account(json.try_path('accountStatement', 'info'))
30
32
  self.transactions = deserialize_transactions(json.try_path('accountStatement', 'transactionList', 'transaction'))
31
33
  self
@@ -0,0 +1,7 @@
1
+ module FioAPI
2
+ class InvalidJsonResponse < StandardError
3
+ def initialize(message = "Invalid JSON response")
4
+ super(message)
5
+ end
6
+ end
7
+ end
data/lib/fio_api.rb CHANGED
@@ -12,12 +12,13 @@ require 'base/payments/xml/root'
12
12
  require 'base/payments/xml/item'
13
13
  require 'base/deserializers/list_response_deserializer'
14
14
  require 'base/deserializers/import_response_deserializer'
15
+ require 'base/errors/invalid_json_response'
15
16
 
16
17
  module FioAPI
17
18
  # == Returns:
18
19
  # A string with current version of gem
19
20
  #
20
- VERSION = '0.0.6'.freeze
21
+ VERSION = '0.0.11'.freeze
21
22
 
22
23
  # Set API token for requests
23
24
  #
metadata CHANGED
@@ -1,12 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fio_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Bortlik
8
8
  - Adam Martinik
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
11
  date: 2018-06-06 00:00:00.000000000 Z
@@ -144,6 +143,7 @@ files:
144
143
  - lib/base/account.rb
145
144
  - lib/base/deserializers/import_response_deserializer.rb
146
145
  - lib/base/deserializers/list_response_deserializer.rb
146
+ - lib/base/errors/invalid_json_response.rb
147
147
  - lib/base/list.rb
148
148
  - lib/base/payment.rb
149
149
  - lib/base/payments/domestic.rb
@@ -180,7 +180,6 @@ homepage: http://github.com/14113/fio_api
180
180
  licenses:
181
181
  - MIT
182
182
  metadata: {}
183
- post_install_message:
184
183
  rdoc_options: []
185
184
  require_paths:
186
185
  - lib
@@ -195,8 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
194
  - !ruby/object:Gem::Version
196
195
  version: '0'
197
196
  requirements: []
198
- rubygems_version: 3.1.6
199
- signing_key:
197
+ rubygems_version: 3.6.4
200
198
  specification_version: 4
201
199
  summary: API wrapper for FIO bank
202
200
  test_files: []