fio_api 0.0.8 → 0.0.9
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 +4 -4
- data/VERSION +1 -1
- data/fio_api.gemspec +1 -1
- data/lib/base/list.rb +5 -5
- data/lib/base/request.rb +1 -1
- data/spec/base/list_spec.rb +5 -5
- data/spec/fixtures/vcr_cassettes/by_date_range.yml +1 -1
- data/spec/fixtures/vcr_cassettes/by_listing_id_and_year.yml +1 -1
- data/spec/fixtures/vcr_cassettes/from_last_fetch.yml +1 -1
- data/spec/fixtures/vcr_cassettes/import.yml +1 -1
- data/spec/fixtures/vcr_cassettes/invalid_import.yml +1 -1
- data/spec/fixtures/vcr_cassettes/old_import.yml +1 -1
- data/spec/fixtures/vcr_cassettes/set_last_fetch_date.yml +1 -1
- data/spec/fixtures/vcr_cassettes/set_last_fetch_id.yml +1 -1
- data/spec/fixtures/vcr_cassettes/wrong_token_import.yml +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: 4637e351ea61bdbf29780a6f484476e8263be5f4affcbe7dbe7d559bb828761e
|
4
|
+
data.tar.gz: 4e32a12e425d4d3a108d58583d0926aaa9931134ea8ae11720412c8487286842
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 889371500122508ad8dd0167505456b64ae0a6a3d215ae07664b9cca54b1b97f960560c44963f19900d30013fa25b2c2f326dd2e5dc98a7b61b147afefeb7068
|
7
|
+
data.tar.gz: af0dea8f4d2b1e98422546583aecde601167a07714f1a8afc055ea7b1c004136cb9cfbfdb9b0d7e3525d36eaf98f3f522f9502eb06dd83e039b76f2c6703b0dc
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.9
|
data/fio_api.gemspec
CHANGED
data/lib/base/list.rb
CHANGED
@@ -14,7 +14,7 @@ module FioAPI
|
|
14
14
|
# == Returns:
|
15
15
|
# List insatnce with account info and transactions list
|
16
16
|
#
|
17
|
-
# https://fioapi.fio.cz/rest/periods/(token)/(date_from)/(date_to)/transactions.(format)
|
17
|
+
# https://fioapi.fio.cz/v1/rest/periods/(token)/(date_from)/(date_to)/transactions.(format)
|
18
18
|
def by_date_range(from_date, to_date)
|
19
19
|
fetch_and_deserialize_response("/periods/#{FioAPI.token}/#{from_date}/#{to_date}/transactions.json")
|
20
20
|
end
|
@@ -30,7 +30,7 @@ module FioAPI
|
|
30
30
|
# == Returns:
|
31
31
|
# List insatnce with account info and transactions list
|
32
32
|
#
|
33
|
-
# https://fioapi.fio.cz/rest/by-id/(token)/(year)/(id)/transactions.(format)
|
33
|
+
# https://fioapi.fio.cz/v1/rest/by-id/(token)/(year)/(id)/transactions.(format)
|
34
34
|
def by_listing_id_and_year(listing_id, year)
|
35
35
|
fetch_and_deserialize_response("/by-id/#{FioAPI.token}/#{year}/#{listing_id}/transactions.json")
|
36
36
|
end
|
@@ -40,7 +40,7 @@ module FioAPI
|
|
40
40
|
# == Returns:
|
41
41
|
# List insatnce with account info and transactions list
|
42
42
|
#
|
43
|
-
# https://fioapi.fio.cz/rest/last/(token)/transactions.(format)
|
43
|
+
# https://fioapi.fio.cz/v1/rest/last/(token)/transactions.(format)
|
44
44
|
def from_last_fetch
|
45
45
|
fetch_and_deserialize_response("/last/#{FioAPI.token}/transactions.json")
|
46
46
|
end
|
@@ -54,7 +54,7 @@ module FioAPI
|
|
54
54
|
# == Returns:
|
55
55
|
# List insatnce with account info and transactions list
|
56
56
|
#
|
57
|
-
# https://fioapi.fio.cz/rest/set-last-id/(token)/(id)/
|
57
|
+
# https://fioapi.fio.cz/v1/rest/set-last-id/(token)/(id)/
|
58
58
|
def set_last_fetch_id(transaction_id)
|
59
59
|
fetch_and_deserialize_response("/set-last-id/#{FioAPI.token}/#{transaction_id}/")
|
60
60
|
end
|
@@ -68,7 +68,7 @@ module FioAPI
|
|
68
68
|
# == Returns:
|
69
69
|
# List insatnce with account info and transactions list
|
70
70
|
#
|
71
|
-
# https://fioapi.fio.cz/rest/set-last-date/(token)/(rrrr-mm-dd)/
|
71
|
+
# https://fioapi.fio.cz/v1/rest/set-last-date/(token)/(rrrr-mm-dd)/
|
72
72
|
def set_last_fetch_date(date)
|
73
73
|
fetch_and_deserialize_response("/set-last-date/#{FioAPI.token}/#{date}/")
|
74
74
|
end
|
data/lib/base/request.rb
CHANGED
data/spec/base/list_spec.rb
CHANGED
@@ -8,7 +8,7 @@ describe FioAPI::List do
|
|
8
8
|
it 'should set request with uri for date range' do
|
9
9
|
date_from = Date.new(2011, 1, 1)
|
10
10
|
date_to = Date.new(2012, 11, 25)
|
11
|
-
url = "https://fioapi.fio.cz/rest/periods/#{FioAPI.token}/#{date_from}/#{date_to}/transactions.json"
|
11
|
+
url = "https://fioapi.fio.cz/v1/rest/periods/#{FioAPI.token}/#{date_from}/#{date_to}/transactions.json"
|
12
12
|
VCR.use_cassette 'by_date_range', erb: true do
|
13
13
|
list = @list.by_date_range(date_from, date_to)
|
14
14
|
expect(list.request.uri.to_s).to eq url
|
@@ -19,7 +19,7 @@ describe FioAPI::List do
|
|
19
19
|
it 'should set request with uri for listing_id and year' do
|
20
20
|
year = 2012
|
21
21
|
id = '12345'
|
22
|
-
url = "https://fioapi.fio.cz/rest/by-id/#{FioAPI.token}/#{year}/#{id}/transactions.json"
|
22
|
+
url = "https://fioapi.fio.cz/v1/rest/by-id/#{FioAPI.token}/#{year}/#{id}/transactions.json"
|
23
23
|
VCR.use_cassette 'by_listing_id_and_year', erb: true do
|
24
24
|
list = @list.by_listing_id_and_year(id, year)
|
25
25
|
expect(list.request.uri.to_s).to eq url
|
@@ -28,7 +28,7 @@ describe FioAPI::List do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
it 'should set request with uri from last fetch' do
|
31
|
-
url = "https://fioapi.fio.cz/rest/last/#{FioAPI.token}/transactions.json"
|
31
|
+
url = "https://fioapi.fio.cz/v1/rest/last/#{FioAPI.token}/transactions.json"
|
32
32
|
VCR.use_cassette 'from_last_fetch', erb: true do
|
33
33
|
list = @list.from_last_fetch
|
34
34
|
expect(list.request.uri.to_s).to eq url
|
@@ -38,7 +38,7 @@ describe FioAPI::List do
|
|
38
38
|
|
39
39
|
it 'should set request with uri to set last fetch id' do
|
40
40
|
id = '12345'
|
41
|
-
url = "https://fioapi.fio.cz/rest/set-last-id/#{FioAPI.token}/#{id}/"
|
41
|
+
url = "https://fioapi.fio.cz/v1/rest/set-last-id/#{FioAPI.token}/#{id}/"
|
42
42
|
VCR.use_cassette 'set_last_fetch_id', erb: true do
|
43
43
|
list = @list.set_last_fetch_id(id)
|
44
44
|
expect(list.request.uri.to_s).to eq url
|
@@ -48,7 +48,7 @@ describe FioAPI::List do
|
|
48
48
|
|
49
49
|
it 'should set request with uri to set last date' do
|
50
50
|
date = Date.new(2012, 11, 25)
|
51
|
-
url = "https://fioapi.fio.cz/rest/set-last-date/#{FioAPI.token}/#{date}/"
|
51
|
+
url = "https://fioapi.fio.cz/v1/rest/set-last-date/#{FioAPI.token}/#{date}/"
|
52
52
|
VCR.use_cassette 'set_last_fetch_date', erb: true do
|
53
53
|
list = @list.set_last_fetch_date(date)
|
54
54
|
expect(list.request.uri.to_s).to eq url
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://fioapi.fio.cz/rest/periods/<%= FioAPI.token %>/2011-01-01/2012-11-25/transactions.json
|
5
|
+
uri: https://fioapi.fio.cz/v1/rest/periods/<%= FioAPI.token %>/2011-01-01/2012-11-25/transactions.json
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ""
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://fioapi.fio.cz/rest/by-id/<%= FioAPI.token %>/2012/12345/transactions.json
|
5
|
+
uri: https://fioapi.fio.cz/v1/rest/by-id/<%= FioAPI.token %>/2012/12345/transactions.json
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ""
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fio_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin Bortlik
|
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
|
-
rubygems_version: 3.
|
198
|
+
rubygems_version: 3.1.6
|
199
199
|
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: API wrapper for FIO bank
|