fio_api 0.0.6 → 0.0.8

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
- SHA1:
3
- metadata.gz: 13a5ab858a6e9b441eb53773dbe28611e6754bf2
4
- data.tar.gz: 9c9d9e3089fdd10c092d3ecfee8c35d17a2fdeb8
2
+ SHA256:
3
+ metadata.gz: a41f97466cbef12c0831c61816e4af0158774950ce6d26e587ad4bf197d8fade
4
+ data.tar.gz: 70f37c8c60b9a66ecc3607a8e932700f9715d7135d8359deee1995ab41d2b8d9
5
5
  SHA512:
6
- metadata.gz: e19bf77982f36c837797367f617c7a66d2a4ae0ea29fb9888071f4965ff47469c6bdff10983d17fe034d13589ffeb6463ab85464eaaf09b77355f7a51935a9ae
7
- data.tar.gz: 56c4ea9d17bb41eb1120998d1bfc7d60853f64c9fecfba7e4ac63b5a291b13bfc4690d424284bcda59cae0eec883fef5920de0fc867d262bfa255a6dacd01ed1
6
+ metadata.gz: e2cf734a2c4a315c310b5484bd2021eaec5b30c1307b83c248f02dbc84e358b790509ba2cba413f0c5484cfc75e65cff33a7c5e67218d16875fdabeb3851fba4
7
+ data.tar.gz: b667de20c8af691bc0c276faade40977b094911bab473536323e0e2a2ee22bc7c559508f3e5147add86ea26c3a28d87942cd04cfcd51eb3369f3b578ac8dd033
data/README.rdoc CHANGED
@@ -19,9 +19,14 @@ This gem is a wrapper for Fio bank API.
19
19
  list.by_date_range(Date.new(2012,11,05), Date.new(2012,12,26)) # Specify listing condition and fetch request
20
20
  list.response # Return deserialized response
21
21
 
22
+ === Request to get transactions form last request
23
+ list = FioAPI::List.new
24
+ list.from_last_fetch
25
+ list.response
26
+
22
27
  === Request transactions by listing_id and year
23
28
  list = FioAPI::List.new
24
- list.by_listing_id_and_year("43XC6362ASD", 2012)
29
+ list.by_listing_id_and_year(1, 2012)
25
30
  list.response
26
31
 
27
32
  === Request to set last request id
@@ -35,10 +40,12 @@ This gem is a wrapper for Fio bank API.
35
40
  list.response
36
41
 
37
42
  === Import domestic payments for authorization
38
- domestic = FioAPI::Payments::Domestic.new(***) # Create new payment
39
- service = FioAPI::Payment.new domestic # Pass one payment or array of payments
43
+ payment = FioAPI::Payments::Domestic.new(:account_from, :currency, :amount, :account_to,
44
+ :bank_code, :ks, :vs, :ss, :date, :message_for_recipient, :comment)
45
+ service = FioAPI::Payment.new [payment] # Pass one payment or array of payments
40
46
  service.import # Call API
41
47
  service.response # Return deserialized response with status code etc.
48
+ service.success? # => true / false
42
49
 
43
50
  == Contributing to fio_api
44
51
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.0.8
data/fio_api.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: fio_api 0.0.6 ruby lib
5
+ # stub: fio_api 0.0.7 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "fio_api".freeze
9
- s.version = "0.0.6"
9
+ s.version = "0.0.8"
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]
13
13
  s.authors = ["Robin Bortlik".freeze, "Adam Martinik".freeze]
14
- s.date = "2018-06-04"
14
+ s.date = "2018-06-06"
15
15
  s.description = "API wrapper for FIO bank".freeze
16
16
  s.email = "a.martinik@gmail.com".freeze
17
17
  s.extra_rdoc_files = [
@@ -58,8 +58,10 @@ Gem::Specification.new do |s|
58
58
  "spec/fixtures/vcr_cassettes/from_last_fetch.yml",
59
59
  "spec/fixtures/vcr_cassettes/import.yml",
60
60
  "spec/fixtures/vcr_cassettes/invalid_import.yml",
61
+ "spec/fixtures/vcr_cassettes/old_import.yml",
61
62
  "spec/fixtures/vcr_cassettes/set_last_fetch_date.yml",
62
63
  "spec/fixtures/vcr_cassettes/set_last_fetch_id.yml",
64
+ "spec/fixtures/vcr_cassettes/wrong_token_import.yml",
63
65
  "spec/spec_helper.rb",
64
66
  "spec/utils/hash_spec.rb"
65
67
  ]
@@ -39,6 +39,7 @@ module FioAPI
39
39
  # == Returns:
40
40
  # Status
41
41
  def deserialize_import(response_json)
42
+ return FioAPI::Payments::Status.new(error_code: 500) unless response_json
42
43
  FioAPI::Payments::Status.new(
43
44
  error_code: response_json.try_path('errorCode').to_i,
44
45
  error_message: response_json.try_path('message').to_s,
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://www.fio.cz/ib_api/rest/periods/(token)/(date_from)/(date_to)/transactions.(format)
17
+ # https://fioapi.fio.cz/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://www.fio.cz/ib_api/rest/by-id/(token)/(year)/(id)/transactions.(format)
33
+ # https://fioapi.fio.cz/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://www.fio.cz/ib_api/rest/last/(token)/transactions.(format)
43
+ # https://fioapi.fio.cz/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://www.fio.cz/ib_api/rest/set-last-id/(token)/(id)/
57
+ # https://fioapi.fio.cz/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://www.fio.cz/ib_api/rest/set-last-date/(token)/(rrrr-mm-dd)/
71
+ # https://fioapi.fio.cz/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/payment.rb CHANGED
@@ -17,6 +17,10 @@ module FioAPI
17
17
  self.request
18
18
  end
19
19
 
20
+ def success?
21
+ response.status.error_code.zero?
22
+ end
23
+
20
24
  private
21
25
 
22
26
  def headers
data/lib/base/request.rb CHANGED
@@ -4,7 +4,7 @@ module FioAPI
4
4
  class Request < FioAPI::Base
5
5
  include HTTParty
6
6
 
7
- base_uri 'https://www.fio.cz/ib_api/rest/'
7
+ base_uri 'https://fioapi.fio.cz/rest/'
8
8
 
9
9
  class << self
10
10
  # Reader for token
@@ -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://www.fio.cz/ib_api/rest/periods/#{FioAPI.token}/#{date_from}/#{date_to}/transactions.json"
11
+ url = "https://fioapi.fio.cz/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://www.fio.cz/ib_api/rest/by-id/#{FioAPI.token}/#{year}/#{id}/transactions.json"
22
+ url = "https://fioapi.fio.cz/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://www.fio.cz/ib_api/rest/last/#{FioAPI.token}/transactions.json"
31
+ url = "https://fioapi.fio.cz/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://www.fio.cz/ib_api/rest/set-last-id/#{FioAPI.token}/#{id}/"
41
+ url = "https://fioapi.fio.cz/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://www.fio.cz/ib_api/rest/set-last-date/#{FioAPI.token}/#{date}/"
51
+ url = "https://fioapi.fio.cz/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
@@ -1,18 +1,20 @@
1
1
  require_relative '../spec_helper'
2
2
 
3
3
  describe FioAPI::Payment do
4
+ let(:date) { '2018-06-15' }
5
+ let(:amount) { 100.0 }
4
6
  before(:each) do
5
- @payment = FioAPI::Payments::Domestic.new(account_from: '11111111', currency: 'CZK', amount: amount, account_to: '22222222', bank_code: '3030', date: '2018-06-15')
7
+ @payment = FioAPI::Payments::Domestic.new(account_from: '11111111', currency: 'CZK', amount: amount, account_to: '22222222', bank_code: '3030', date: date)
6
8
  @service = FioAPI::Payment.new [@payment]
7
9
  end
8
10
 
9
11
  context 'payment with valid data' do
10
- let(:amount) { 100.0 }
11
12
  it 'should make request' do
12
13
  VCR.use_cassette 'import', erb: true do
13
14
  expect(@service.import).to be_a HTTParty::Response
14
15
  expect(@service.request).to be_a HTTParty::Response
15
16
  expect(@service.response).to be_a FioAPI::ImportResponseDeserializer
17
+ expect(@service.success?).to eq true
16
18
  end
17
19
  end
18
20
 
@@ -21,13 +23,46 @@ describe FioAPI::Payment do
21
23
  end
22
24
  end
23
25
 
24
- context 'payment with invalid data' do
26
+ context 'payment with old payment' do
27
+ let(:date) { '2018-05-05' }
28
+ it 'should make request' do
29
+ VCR.use_cassette 'old_import', erb: true do
30
+ expect(@service.import).to be_a HTTParty::Response
31
+ expect(@service.request).to be_a HTTParty::Response
32
+ expect(@service.response).to be_a FioAPI::ImportResponseDeserializer
33
+ expect(@service.success?).to eq false
34
+ end
35
+ end
36
+
37
+ it 'should build path' do
38
+ expect(@service.path).to eq "/import/?token=#{FioAPI.token}&type=xml"
39
+ end
40
+ end
41
+
42
+ context 'payment with wrong token' do
43
+ let(:date) { '2018-05-05' }
44
+ it 'should make request' do
45
+ VCR.use_cassette 'wrong_token_import', erb: true do
46
+ expect(@service.import).to be_a HTTParty::Response
47
+ expect(@service.request).to be_a HTTParty::Response
48
+ expect(@service.response).to be_a FioAPI::ImportResponseDeserializer
49
+ expect(@service.success?).to eq false
50
+ end
51
+ end
52
+
53
+ it 'should build path' do
54
+ expect(@service.path).to eq "/import/?token=#{FioAPI.token}&type=xml"
55
+ end
56
+ end
57
+
58
+ context 'payment with zero amount data' do
25
59
  let(:amount) { '' }
26
60
  it 'should make request' do
27
61
  VCR.use_cassette 'invalid_import', erb: true do
28
62
  expect(@service.import).to be_a HTTParty::Response
29
63
  expect(@service.request).to be_a HTTParty::Response
30
64
  expect(@service.response).to be_a FioAPI::ImportResponseDeserializer
65
+ expect(@service.success?).to eq false
31
66
  end
32
67
  end
33
68
 
@@ -1,47 +1,47 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://www.fio.cz/ib_api/rest/periods/<%= FioAPI.token %>/2011-01-01/2012-11-25/transactions.json
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Date:
22
- - Sat, 02 Jun 2018 21:19:18 GMT
23
- Server:
24
- - Apache-Coyote/1.1
25
- X-Content-Type-Options:
26
- - nosniff
27
- X-Xss-Protection:
28
- - 1; mode=block
29
- Referrer-Policy:
30
- - strict-origin-when-cross-origin
31
- X-Intervalusetoken:
32
- - '20000'
33
- Content-Type:
34
- - application/json;charset=UTF-8
35
- Content-Length:
36
- - '1253'
37
- X-Frame-Options:
38
- - SAMEORIGIN
39
- Strict-Transport-Security:
40
- - max-age=31536000
41
- body:
42
- encoding: ASCII-8BIT
43
- string: !binary |-
44
- eyJhY2NvdW50U3RhdGVtZW50Ijp7ImluZm8iOnsiYWNjb3VudElkIjoiMjMwMDMxODY1MCIsImJhbmtJZCI6IjIwMTAiLCJjdXJyZW5jeSI6IkNaSyIsImliYW4iOiJDWjc5MjAxMDAwMDAwMDIzMDAzMTg2NTAiLCJiaWMiOiJGSU9CQ1pQUFhYWCIsIm9wZW5pbmdCYWxhbmNlIjowLjAwLCJjbG9zaW5nQmFsYW5jZSI6MTAwLjAwLCJkYXRlU3RhcnQiOiIyMDExLTAxLTAxKzAxMDAiLCJkYXRlRW5kIjoiMjAxMi0xMS0yNSswMTAwIiwieWVhckxpc3QiOm51bGwsImlkTGlzdCI6bnVsbCwiaWRGcm9tIjoxMTYwNTE1NjY5LCJpZFRvIjoxMTYwNTE1NjY5LCJpZExhc3REb3dubG9hZCI6bnVsbH0sInRyYW5zYWN0aW9uTGlzdCI6eyJ0cmFuc2FjdGlvbiI6W3siY29sdW1uMjIiOnsidmFsdWUiOjExNjA1MTU2NjksIm5hbWUiOiJJRCBwb2h5YnUiLCJpZCI6MjJ9LCJjb2x1bW4wIjp7InZhbHVlIjoiMjAxMi0xMC0xOCswMjAwIiwibmFtZSI6IkRhdHVtIiwiaWQiOjB9LCJjb2x1bW4xIjp7InZhbHVlIjoxMDAuMDAsIm5hbWUiOiJPYmplbSIsImlkIjoxfSwiY29sdW1uMTQiOnsidmFsdWUiOiJDWksiLCJuYW1lIjoiTcSbbmEiLCJpZCI6MTR9LCJjb2x1bW4yIjp7InZhbHVlIjoiMjYwMDE3MDIwNSIsIm5hbWUiOiJQcm90acO6xI1ldCIsImlkIjoyfSwiY29sdW1uMTAiOnsidmFsdWUiOiJNYXJ0aW7DrWssIEFkYW0iLCJuYW1lIjoiTsOhemV2IHByb3Rpw7rEjXR1IiwiaWQiOjEwfSwiY29sdW1uMyI6eyJ2YWx1ZSI6IjIwMTAiLCJuYW1lIjoiS8OzZCBiYW5reSIsImlkIjozfSwiY29sdW1uMTIiOnsidmFsdWUiOiJGaW8gYmFua2EsIGEucy4iLCJuYW1lIjoiTsOhemV2IGJhbmt5IiwiaWQiOjEyfSwiY29sdW1uNCI6bnVsbCwiY29sdW1uNSI6bnVsbCwiY29sdW1uNiI6bnVsbCwiY29sdW1uNyI6bnVsbCwiY29sdW1uMTYiOnsidmFsdWUiOiJNaW5pbGFuaSB2a2xhZCBwcm8gRklPIiwibmFtZSI6IlpwcsOhdmEgcHJvIHDFmcOtamVtY2UiLCJpZCI6MTZ9LCJjb2x1bW44Ijp7InZhbHVlIjoiUMWZw61qZW0gcMWZZXZvZGVtIHV2bml0xZkgYmFua3kiLCJuYW1lIjoiVHlwIiwiaWQiOjh9LCJjb2x1bW45IjpudWxsLCJjb2x1bW4xOCI6bnVsbCwiY29sdW1uMjUiOnsidmFsdWUiOiJNaW5pbGFuaSB2a2xhZCBwcm8gRklPIiwibmFtZSI6IktvbWVudMOhxZkiLCJpZCI6MjV9LCJjb2x1bW4yNiI6bnVsbCwiY29sdW1uMTciOnsidmFsdWUiOjIxNjM3MzEwNTEsIm5hbWUiOiJJRCBwb2t5bnUiLCJpZCI6MTd9fV19fX0=
45
- http_version:
46
- recorded_at: Sat, 02 Jun 2018 21:19:19 GMT
3
+ - request:
4
+ method: get
5
+ uri: https://fioapi.fio.cz/rest/periods/<%= FioAPI.token %>/2011-01-01/2012-11-25/transactions.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sat, 02 Jun 2018 21:19:18 GMT
23
+ Server:
24
+ - Apache-Coyote/1.1
25
+ X-Content-Type-Options:
26
+ - nosniff
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ Referrer-Policy:
30
+ - strict-origin-when-cross-origin
31
+ X-Intervalusetoken:
32
+ - "20000"
33
+ Content-Type:
34
+ - application/json;charset=UTF-8
35
+ Content-Length:
36
+ - "1253"
37
+ X-Frame-Options:
38
+ - SAMEORIGIN
39
+ Strict-Transport-Security:
40
+ - max-age=31536000
41
+ body:
42
+ encoding: ASCII-8BIT
43
+ string: !binary |-
44
+ eyJhY2NvdW50U3RhdGVtZW50Ijp7ImluZm8iOnsiYWNjb3VudElkIjoiMjMwMDMxODY1MCIsImJhbmtJZCI6IjIwMTAiLCJjdXJyZW5jeSI6IkNaSyIsImliYW4iOiJDWjc5MjAxMDAwMDAwMDIzMDAzMTg2NTAiLCJiaWMiOiJGSU9CQ1pQUFhYWCIsIm9wZW5pbmdCYWxhbmNlIjowLjAwLCJjbG9zaW5nQmFsYW5jZSI6MTAwLjAwLCJkYXRlU3RhcnQiOiIyMDExLTAxLTAxKzAxMDAiLCJkYXRlRW5kIjoiMjAxMi0xMS0yNSswMTAwIiwieWVhckxpc3QiOm51bGwsImlkTGlzdCI6bnVsbCwiaWRGcm9tIjoxMTYwNTE1NjY5LCJpZFRvIjoxMTYwNTE1NjY5LCJpZExhc3REb3dubG9hZCI6bnVsbH0sInRyYW5zYWN0aW9uTGlzdCI6eyJ0cmFuc2FjdGlvbiI6W3siY29sdW1uMjIiOnsidmFsdWUiOjExNjA1MTU2NjksIm5hbWUiOiJJRCBwb2h5YnUiLCJpZCI6MjJ9LCJjb2x1bW4wIjp7InZhbHVlIjoiMjAxMi0xMC0xOCswMjAwIiwibmFtZSI6IkRhdHVtIiwiaWQiOjB9LCJjb2x1bW4xIjp7InZhbHVlIjoxMDAuMDAsIm5hbWUiOiJPYmplbSIsImlkIjoxfSwiY29sdW1uMTQiOnsidmFsdWUiOiJDWksiLCJuYW1lIjoiTcSbbmEiLCJpZCI6MTR9LCJjb2x1bW4yIjp7InZhbHVlIjoiMjYwMDE3MDIwNSIsIm5hbWUiOiJQcm90acO6xI1ldCIsImlkIjoyfSwiY29sdW1uMTAiOnsidmFsdWUiOiJNYXJ0aW7DrWssIEFkYW0iLCJuYW1lIjoiTsOhemV2IHByb3Rpw7rEjXR1IiwiaWQiOjEwfSwiY29sdW1uMyI6eyJ2YWx1ZSI6IjIwMTAiLCJuYW1lIjoiS8OzZCBiYW5reSIsImlkIjozfSwiY29sdW1uMTIiOnsidmFsdWUiOiJGaW8gYmFua2EsIGEucy4iLCJuYW1lIjoiTsOhemV2IGJhbmt5IiwiaWQiOjEyfSwiY29sdW1uNCI6bnVsbCwiY29sdW1uNSI6bnVsbCwiY29sdW1uNiI6bnVsbCwiY29sdW1uNyI6bnVsbCwiY29sdW1uMTYiOnsidmFsdWUiOiJNaW5pbGFuaSB2a2xhZCBwcm8gRklPIiwibmFtZSI6IlpwcsOhdmEgcHJvIHDFmcOtamVtY2UiLCJpZCI6MTZ9LCJjb2x1bW44Ijp7InZhbHVlIjoiUMWZw61qZW0gcMWZZXZvZGVtIHV2bml0xZkgYmFua3kiLCJuYW1lIjoiVHlwIiwiaWQiOjh9LCJjb2x1bW45IjpudWxsLCJjb2x1bW4xOCI6bnVsbCwiY29sdW1uMjUiOnsidmFsdWUiOiJNaW5pbGFuaSB2a2xhZCBwcm8gRklPIiwibmFtZSI6IktvbWVudMOhxZkiLCJpZCI6MjV9LCJjb2x1bW4yNiI6bnVsbCwiY29sdW1uMTciOnsidmFsdWUiOjIxNjM3MzEwNTEsIm5hbWUiOiJJRCBwb2t5bnUiLCJpZCI6MTd9fV19fX0=
45
+ http_version:
46
+ recorded_at: Sat, 02 Jun 2018 21:19:19 GMT
47
47
  recorded_with: VCR 4.0.0
@@ -1,49 +1,49 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://www.fio.cz/ib_api/rest/by-id/<%= FioAPI.token %>/2012/12345/transactions.json
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 500
19
- message: Internal Server Error
20
- headers:
21
- Date:
22
- - Sat, 02 Jun 2018 21:21:47 GMT
23
- Server:
24
- - Apache-Coyote/1.1
25
- X-Content-Type-Options:
26
- - nosniff
27
- X-Xss-Protection:
28
- - 1; mode=block
29
- Referrer-Policy:
30
- - strict-origin-when-cross-origin
31
- X-Intervalusetoken:
32
- - '20000'
33
- Content-Type:
34
- - text/xml;charset=UTF-8
35
- Content-Length:
36
- - '338'
37
- X-Frame-Options:
38
- - SAMEORIGIN
39
- Strict-Transport-Security:
40
- - max-age=31536000
41
- Connection:
42
- - close
43
- body:
44
- encoding: ASCII-8BIT
45
- string: !binary |-
46
- PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PgoKPHJlc3BvbnNlIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzaTpub05hbWVzcGFjZVNjaGVtYUxvY2F0aW9uPSJodHRwczovL3d3dy5maW8uY3ovc2NoZW1hL3Jlc3BvbnNlLnhzZCI+Cgk8cmVzdWx0PiAKCQk8ZXJyb3JDb2RlPjIxPC9lcnJvckNvZGU+CgkJPHN0YXR1cz5lcnJvcjwvc3RhdHVzPgoJCTxtZXNzYWdlPlbDvXBpcyBuZWV4aXN0dWplPC9tZXNzYWdlPgoJCTxkZXRhaWw+PC9kZXRhaWw+Cgk8L3Jlc3VsdD4KPC9yZXNwb25zZT4=
47
- http_version:
48
- recorded_at: Sat, 02 Jun 2018 21:21:47 GMT
3
+ - request:
4
+ method: get
5
+ uri: https://fioapi.fio.cz/rest/by-id/<%= FioAPI.token %>/2012/12345/transactions.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 500
19
+ message: Internal Server Error
20
+ headers:
21
+ Date:
22
+ - Sat, 02 Jun 2018 21:21:47 GMT
23
+ Server:
24
+ - Apache-Coyote/1.1
25
+ X-Content-Type-Options:
26
+ - nosniff
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ Referrer-Policy:
30
+ - strict-origin-when-cross-origin
31
+ X-Intervalusetoken:
32
+ - "20000"
33
+ Content-Type:
34
+ - text/xml;charset=UTF-8
35
+ Content-Length:
36
+ - "338"
37
+ X-Frame-Options:
38
+ - SAMEORIGIN
39
+ Strict-Transport-Security:
40
+ - max-age=31536000
41
+ Connection:
42
+ - close
43
+ body:
44
+ encoding: ASCII-8BIT
45
+ string: !binary |-
46
+ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PgoKPHJlc3BvbnNlIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzaTpub05hbWVzcGFjZVNjaGVtYUxvY2F0aW9uPSJodHRwczovL3d3dy5maW8uY3ovc2NoZW1hL3Jlc3BvbnNlLnhzZCI+Cgk8cmVzdWx0PiAKCQk8ZXJyb3JDb2RlPjIxPC9lcnJvckNvZGU+CgkJPHN0YXR1cz5lcnJvcjwvc3RhdHVzPgoJCTxtZXNzYWdlPlbDvXBpcyBuZWV4aXN0dWplPC9tZXNzYWdlPgoJCTxkZXRhaWw+PC9kZXRhaWw+Cgk8L3Jlc3VsdD4KPC9yZXNwb25zZT4=
47
+ http_version:
48
+ recorded_at: Sat, 02 Jun 2018 21:21:47 GMT
49
49
  recorded_with: VCR 4.0.0
@@ -1,44 +1,44 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://www.fio.cz/ib_api/rest/last/<%= FioAPI.token %>/transactions.json
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 409
19
- message: Conflict
20
- headers:
21
- Date:
22
- - Sat, 02 Jun 2018 21:21:47 GMT
23
- Server:
24
- - Apache-Coyote/1.1
25
- X-Content-Type-Options:
26
- - nosniff
27
- X-Xss-Protection:
28
- - 1; mode=block
29
- Referrer-Policy:
30
- - strict-origin-when-cross-origin
31
- Content-Type:
32
- - text/plain;charset=UTF-8
33
- Content-Length:
34
- - '0'
35
- X-Frame-Options:
36
- - SAMEORIGIN
37
- Strict-Transport-Security:
38
- - max-age=31536000
39
- body:
40
- encoding: UTF-8
41
- string: ''
42
- http_version:
43
- recorded_at: Sat, 02 Jun 2018 21:21:47 GMT
3
+ - request:
4
+ method: get
5
+ uri: https://fioapi.fio.cz/rest/last/<%= FioAPI.token %>/transactions.json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 409
19
+ message: Conflict
20
+ headers:
21
+ Date:
22
+ - Sat, 02 Jun 2018 21:21:47 GMT
23
+ Server:
24
+ - Apache-Coyote/1.1
25
+ X-Content-Type-Options:
26
+ - nosniff
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ Referrer-Policy:
30
+ - strict-origin-when-cross-origin
31
+ Content-Type:
32
+ - text/plain;charset=UTF-8
33
+ Content-Length:
34
+ - "0"
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
37
+ Strict-Transport-Security:
38
+ - max-age=31536000
39
+ body:
40
+ encoding: UTF-8
41
+ string: ""
42
+ http_version:
43
+ recorded_at: Sat, 02 Jun 2018 21:21:47 GMT
44
44
  recorded_with: VCR 4.0.0
@@ -1,53 +1,55 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: post
5
- uri: https://www.fio.cz/ib_api/rest/import/?token=<%= FioAPI.token %>&type=xml
6
- body:
7
- encoding: UTF-8
8
- string: "--------------------------zhBhYIqS35Jglk8M\r\nContent-Disposition:
9
- form-data; name=\"file\"; filename=\"20180603-11219-1kw9ccy\"\r\nContent-Type:
10
- application/octet-stream\r\n\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Import
11
- xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://www.fio.cz/schema/importIB.xsd\">\n
12
- \ <Orders>\n <DomesticTransaction>\n <accountFrom>11111111</accountFrom>\n
13
- \ <currency>CZK</currency>\n <amount>100.0</amount>\n <accountTo>22222222</accountTo>\n
14
- \ <bankCode>3030</bankCode>\n <ks/>\n <vs/>\n <ss/>\n <date>2018-06-15</date>\n
15
- \ <messageForRecipient/>\n <comment/>\n <paymentType>431001</paymentType>\n
16
- \ </DomesticTransaction>\n </Orders>\n</Import>\n\r\n--------------------------zhBhYIqS35Jglk8M--\r\n"
17
- headers:
18
- Content-Type:
19
- - multipart/form-data; boundary=------------------------zhBhYIqS35Jglk8M
20
- Boundary:
21
- - "-----------RubyMultipartPost"
22
- response:
23
- status:
24
- code: 200
25
- message: OK
26
- headers:
27
- Date:
28
- - Sat, 02 Jun 2018 23:49:44 GMT
29
- Server:
30
- - Apache-Coyote/1.1
31
- X-Content-Type-Options:
32
- - nosniff
33
- X-Xss-Protection:
34
- - 1; mode=block
35
- Referrer-Policy:
36
- - strict-origin-when-cross-origin
37
- Content-Type:
38
- - application/xml;charset=UTF-8
39
- X-Frame-Options:
40
- - SAMEORIGIN
41
- Strict-Transport-Security:
42
- - max-age=31536000
43
- Transfer-Encoding:
44
- - chunked
45
- body:
46
- encoding: UTF-8
47
- string: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><responseImport
48
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.fio.cz/schema/responseImport.xsd"><result><errorCode>0</errorCode><idInstruction>153935923</idInstruction><status>ok</status><sums><sum
49
- id="CZK"><sumCredit>0</sumCredit><sumDebet>100.0</sumDebet></sum></sums></result><ordersDetails><detail
50
- id="1"><messages><message status="ok" errorCode="0">OK</message></messages></detail></ordersDetails></responseImport>
51
- http_version:
52
- recorded_at: Sat, 02 Jun 2018 23:49:44 GMT
3
+ - request:
4
+ method: post
5
+ uri: https://fioapi.fio.cz/rest/import/?token=<%= FioAPI.token %>&type=xml
6
+ body:
7
+ encoding: UTF-8
8
+ string:
9
+ "--------------------------zhBhYIqS35Jglk8M\r\nContent-Disposition:
10
+ form-data; name=\"file\"; filename=\"20180603-11219-1kw9ccy\"\r\nContent-Type:
11
+ application/octet-stream\r\n\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Import
12
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://www.fio.cz/schema/importIB.xsd\">\n
13
+ \ <Orders>\n <DomesticTransaction>\n <accountFrom>11111111</accountFrom>\n
14
+ \ <currency>CZK</currency>\n <amount>100.0</amount>\n <accountTo>22222222</accountTo>\n
15
+ \ <bankCode>3030</bankCode>\n <ks/>\n <vs/>\n <ss/>\n <date>2018-06-15</date>\n
16
+ \ <messageForRecipient/>\n <comment/>\n <paymentType>431001</paymentType>\n
17
+ \ </DomesticTransaction>\n </Orders>\n</Import>\n\r\n--------------------------zhBhYIqS35Jglk8M--\r\n"
18
+ headers:
19
+ Content-Type:
20
+ - multipart/form-data; boundary=------------------------zhBhYIqS35Jglk8M
21
+ Boundary:
22
+ - "-----------RubyMultipartPost"
23
+ response:
24
+ status:
25
+ code: 200
26
+ message: OK
27
+ headers:
28
+ Date:
29
+ - Sat, 02 Jun 2018 23:49:44 GMT
30
+ Server:
31
+ - Apache-Coyote/1.1
32
+ X-Content-Type-Options:
33
+ - nosniff
34
+ X-Xss-Protection:
35
+ - 1; mode=block
36
+ Referrer-Policy:
37
+ - strict-origin-when-cross-origin
38
+ Content-Type:
39
+ - application/xml;charset=UTF-8
40
+ X-Frame-Options:
41
+ - SAMEORIGIN
42
+ Strict-Transport-Security:
43
+ - max-age=31536000
44
+ Transfer-Encoding:
45
+ - chunked
46
+ body:
47
+ encoding: UTF-8
48
+ string:
49
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?><responseImport
50
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.fio.cz/schema/responseImport.xsd"><result><errorCode>0</errorCode><idInstruction>153935923</idInstruction><status>ok</status><sums><sum
51
+ id="CZK"><sumCredit>0</sumCredit><sumDebet>100.0</sumDebet></sum></sums></result><ordersDetails><detail
52
+ id="1"><messages><message status="ok" errorCode="0">OK</message></messages></detail></ordersDetails></responseImport>
53
+ http_version:
54
+ recorded_at: Sat, 02 Jun 2018 23:49:44 GMT
53
55
  recorded_with: VCR 4.0.0
@@ -1,51 +1,52 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: post
5
- uri: https://www.fio.cz/ib_api/rest/import/?token=<%= FioAPI.token %>&type=xml
6
- body:
7
- encoding: UTF-8
8
- string: "--------------------------8kR1u87fzZKMC9tT\r\nContent-Disposition:
9
- form-data; name=\"file\"; filename=\"20180603-18534-1yh8r7y\"\r\nContent-Type:
10
- application/octet-stream\r\n\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Import
11
- xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://www.fio.cz/schema/importIB.xsd\">\n
12
- \ <Orders>\n <DomesticTransaction>\n <accountFrom>11111111</accountFrom>\n
13
- \ <currency>CZK</currency>\n <amount/>\n <accountTo>22222222</accountTo>\n
14
- \ <bankCode>3030</bankCode>\n <ks/>\n <vs/>\n <ss/>\n <date>2018-06-15</date>\n
15
- \ <messageForRecipient/>\n <comment/>\n <paymentType>431001</paymentType>\n
16
- \ </DomesticTransaction>\n </Orders>\n</Import>\n\r\n--------------------------8kR1u87fzZKMC9tT--\r\n"
17
- headers:
18
- Content-Type:
19
- - multipart/form-data; boundary=------------------------8kR1u87fzZKMC9tT
20
- Boundary:
21
- - "-----------RubyMultipartPost"
22
- response:
23
- status:
24
- code: 200
25
- message: OK
26
- headers:
27
- Date:
28
- - Sun, 03 Jun 2018 12:28:55 GMT
29
- Server:
30
- - Apache-Coyote/1.1
31
- X-Content-Type-Options:
32
- - nosniff
33
- X-Xss-Protection:
34
- - 1; mode=block
35
- Referrer-Policy:
36
- - strict-origin-when-cross-origin
37
- Content-Type:
38
- - application/xml;charset=UTF-8
39
- X-Frame-Options:
40
- - SAMEORIGIN
41
- Strict-Transport-Security:
42
- - max-age=31536000
43
- Transfer-Encoding:
44
- - chunked
45
- body:
46
- encoding: ASCII-8BIT
47
- string: !binary |-
48
- PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxyZXNwb25zZUltcG9ydCB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6bm9OYW1lc3BhY2VTY2hlbWFMb2NhdGlvbj0iaHR0cDovL3d3dy5maW8uY3ovc2NoZW1hL3Jlc3BvbnNlSW1wb3J0LnhzZCI+PHJlc3VsdD48ZXJyb3JDb2RlPjExPC9lcnJvckNvZGU+PHN0YXR1cz5lcnJvcjwvc3RhdHVzPjxtZXNzYWdlPlNvdWJvciBtw6EgY2h5YnkgdmUgc3RydWt0dcWZZTogY3ZjLWRhdGF0eXBlLXZhbGlkLjEuMi4xOiAnJyBpcyBub3QgYSB2YWxpZCB2YWx1ZSBmb3IgJ2RlY2ltYWwnLjwvbWVzc2FnZT48L3Jlc3VsdD48L3Jlc3BvbnNlSW1wb3J0Pg==
49
- http_version:
50
- recorded_at: Sun, 03 Jun 2018 12:28:55 GMT
3
+ - request:
4
+ method: post
5
+ uri: https://fioapi.fio.cz/rest/import/?token=<%= FioAPI.token %>&type=xml
6
+ body:
7
+ encoding: UTF-8
8
+ string:
9
+ "--------------------------8kR1u87fzZKMC9tT\r\nContent-Disposition:
10
+ form-data; name=\"file\"; filename=\"20180603-18534-1yh8r7y\"\r\nContent-Type:
11
+ application/octet-stream\r\n\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Import
12
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://www.fio.cz/schema/importIB.xsd\">\n
13
+ \ <Orders>\n <DomesticTransaction>\n <accountFrom>11111111</accountFrom>\n
14
+ \ <currency>CZK</currency>\n <amount/>\n <accountTo>22222222</accountTo>\n
15
+ \ <bankCode>3030</bankCode>\n <ks/>\n <vs/>\n <ss/>\n <date>2018-06-15</date>\n
16
+ \ <messageForRecipient/>\n <comment/>\n <paymentType>431001</paymentType>\n
17
+ \ </DomesticTransaction>\n </Orders>\n</Import>\n\r\n--------------------------8kR1u87fzZKMC9tT--\r\n"
18
+ headers:
19
+ Content-Type:
20
+ - multipart/form-data; boundary=------------------------8kR1u87fzZKMC9tT
21
+ Boundary:
22
+ - "-----------RubyMultipartPost"
23
+ response:
24
+ status:
25
+ code: 200
26
+ message: OK
27
+ headers:
28
+ Date:
29
+ - Sun, 03 Jun 2018 12:28:55 GMT
30
+ Server:
31
+ - Apache-Coyote/1.1
32
+ X-Content-Type-Options:
33
+ - nosniff
34
+ X-Xss-Protection:
35
+ - 1; mode=block
36
+ Referrer-Policy:
37
+ - strict-origin-when-cross-origin
38
+ Content-Type:
39
+ - application/xml;charset=UTF-8
40
+ X-Frame-Options:
41
+ - SAMEORIGIN
42
+ Strict-Transport-Security:
43
+ - max-age=31536000
44
+ Transfer-Encoding:
45
+ - chunked
46
+ body:
47
+ encoding: ASCII-8BIT
48
+ string: !binary |-
49
+ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxyZXNwb25zZUltcG9ydCB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6bm9OYW1lc3BhY2VTY2hlbWFMb2NhdGlvbj0iaHR0cDovL3d3dy5maW8uY3ovc2NoZW1hL3Jlc3BvbnNlSW1wb3J0LnhzZCI+PHJlc3VsdD48ZXJyb3JDb2RlPjExPC9lcnJvckNvZGU+PHN0YXR1cz5lcnJvcjwvc3RhdHVzPjxtZXNzYWdlPlNvdWJvciBtw6EgY2h5YnkgdmUgc3RydWt0dcWZZTogY3ZjLWRhdGF0eXBlLXZhbGlkLjEuMi4xOiAnJyBpcyBub3QgYSB2YWxpZCB2YWx1ZSBmb3IgJ2RlY2ltYWwnLjwvbWVzc2FnZT48L3Jlc3VsdD48L3Jlc3BvbnNlSW1wb3J0Pg==
50
+ http_version:
51
+ recorded_at: Sun, 03 Jun 2018 12:28:55 GMT
51
52
  recorded_with: VCR 4.0.0
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://fioapi.fio.cz/rest/import/?token=<%= FioAPI.token %>&type=xml
6
+ body:
7
+ encoding: UTF-8
8
+ string:
9
+ "--------------------------YU5IeT1XYDoNHP6A\r\nContent-Disposition:
10
+ form-data; name=\"file\"; filename=\"fio20180606-86151-1fg6aja\"\r\nContent-Type:
11
+ application/octet-stream\r\n\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Import
12
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://www.fio.cz/schema/importIB.xsd\">\n
13
+ \ <Orders>\n <DomesticTransaction>\n <accountFrom>11111111</accountFrom>\n
14
+ \ <currency>CZK</currency>\n <amount>100.0</amount>\n <accountTo>22222222</accountTo>\n
15
+ \ <bankCode>3030</bankCode>\n <ks/>\n <vs/>\n <ss/>\n <date>2018-05-05</date>\n
16
+ \ <messageForRecipient/>\n <comment/>\n <paymentType>431001</paymentType>\n
17
+ \ </DomesticTransaction>\n </Orders>\n</Import>\n\r\n--------------------------YU5IeT1XYDoNHP6A--\r\n"
18
+ headers:
19
+ Content-Type:
20
+ - multipart/form-data; boundary=------------------------YU5IeT1XYDoNHP6A
21
+ Boundary:
22
+ - "-----------RubyMultipartPost"
23
+ response:
24
+ status:
25
+ code: 200
26
+ message: OK
27
+ headers:
28
+ Date:
29
+ - Wed, 06 Jun 2018 11:14:56 GMT
30
+ Server:
31
+ - Apache-Coyote/1.1
32
+ X-Content-Type-Options:
33
+ - nosniff
34
+ X-Xss-Protection:
35
+ - 1; mode=block
36
+ Referrer-Policy:
37
+ - strict-origin-when-cross-origin
38
+ Content-Type:
39
+ - application/xml;charset=UTF-8
40
+ X-Frame-Options:
41
+ - SAMEORIGIN
42
+ Strict-Transport-Security:
43
+ - max-age=31536000
44
+ Transfer-Encoding:
45
+ - chunked
46
+ body:
47
+ encoding: ASCII-8BIT
48
+ string: !binary |-
49
+ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxyZXNwb25zZUltcG9ydCB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6bm9OYW1lc3BhY2VTY2hlbWFMb2NhdGlvbj0iaHR0cDovL3d3dy5maW8uY3ovc2NoZW1hL3Jlc3BvbnNlSW1wb3J0LnhzZCI+PHJlc3VsdD48ZXJyb3JDb2RlPjE8L2Vycm9yQ29kZT48c3RhdHVzPmVycm9yPC9zdGF0dXM+PHN1bXM+PHN1bSBpZD0iQ1pLIj48c3VtQ3JlZGl0PjA8L3N1bUNyZWRpdD48c3VtRGViZXQ+MTAwLjA8L3N1bURlYmV0Pjwvc3VtPjwvc3Vtcz48L3Jlc3VsdD48b3JkZXJzRGV0YWlscz48ZGV0YWlsIGlkPSIxIj48bWVzc2FnZXM+PG1lc3NhZ2Ugc3RhdHVzPSJlcnJvciIgZXJyb3JDb2RlPSIxNCI+RGF0dW0gcGxhdGJ5IGplIHYgbWludWxvc3RpPC9tZXNzYWdlPjxtZXNzYWdlIHN0YXR1cz0iZXJyb3IiIGVycm9yQ29kZT0iMjciPlogdG9ob3RvIGtvbnRhIG5lbHplIHBvZMOhdmF0IMW+w6FkbsOpIHDFmcOta2F6eS48L21lc3NhZ2U+PG1lc3NhZ2Ugc3RhdHVzPSJlcnJvciIgZXJyb3JDb2RlPSI1NSI+WmFkYW7DqSDEjcOtc2xvIHByb3Rpw7rEjXR1IG5lb2Rwb3bDrWTDoSBwb3Zpbm7DqW11IGZvcm3DoXR1IMSMTkIgYSBOQlMuPC9tZXNzYWdlPjxtZXNzYWdlIHN0YXR1cz0iZXJyb3IiIGVycm9yQ29kZT0iMTA4Ij7EjMOtc2xvIMO6xI10dSBwxZnDrWplbWNlIGplIGlkZW50aWNrw6kgcyDEjcOtc2xlbSDDusSNdHUgcGzDoXRjZS48L21lc3NhZ2U+PG1lc3NhZ2Ugc3RhdHVzPSJ3YXJuaW5nIiBlcnJvckNvZGU9IjE1NyI+VXBvem9ybsSbbsOtOiBwb2TDoXbDoXRlIHBva3luIGsgcGxhdGLEmyB2IG3Em27Emywga3RlcsOhIG5lbsOtIG3Em25vdSB0b2hvdG8gw7rEjXR1LiBaa29udHJvbHVqdGUgcHJvc8OtbSwgemRhIG3DoXRlIHNwcsOhdm7EmyB6dm9sZW5vdSBtxJtudSBWYcWhw60gcGxhdGJ5LjwvbWVzc2FnZT48bWVzc2FnZSBzdGF0dXM9ImVycm9yIiBlcnJvckNvZGU9IjIwMDEiPlZhxaFlIHXFvml2YXRlbHNrw6kgb3Byw6F2bsSbbsOtIG5lcG92b2x1amUgcG9kw6Fuw60gcG9reW51IHogdG9ob3RvIMO6xI10dTwvbWVzc2FnZT48L21lc3NhZ2VzPjwvZGV0YWlsPjwvb3JkZXJzRGV0YWlscz48L3Jlc3BvbnNlSW1wb3J0Pg==
50
+ http_version:
51
+ recorded_at: Wed, 06 Jun 2018 11:14:56 GMT
52
+ recorded_with: VCR 4.0.0
@@ -1,44 +1,44 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://www.fio.cz/ib_api/rest/set-last-date/<%= FioAPI.token %>/2012-11-25/
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Date:
22
- - Sat, 02 Jun 2018 21:21:47 GMT
23
- Server:
24
- - Apache-Coyote/1.1
25
- X-Content-Type-Options:
26
- - nosniff
27
- X-Xss-Protection:
28
- - 1; mode=block
29
- Referrer-Policy:
30
- - strict-origin-when-cross-origin
31
- X-Intervalusetoken:
32
- - '0'
33
- Content-Length:
34
- - '0'
35
- X-Frame-Options:
36
- - SAMEORIGIN
37
- Strict-Transport-Security:
38
- - max-age=31536000
39
- body:
40
- encoding: UTF-8
41
- string: ''
42
- http_version:
43
- recorded_at: Sat, 02 Jun 2018 21:21:47 GMT
3
+ - request:
4
+ method: get
5
+ uri: https://fioapi.fio.cz/rest/set-last-date/<%= FioAPI.token %>/2012-11-25/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Date:
22
+ - Sat, 02 Jun 2018 21:21:47 GMT
23
+ Server:
24
+ - Apache-Coyote/1.1
25
+ X-Content-Type-Options:
26
+ - nosniff
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ Referrer-Policy:
30
+ - strict-origin-when-cross-origin
31
+ X-Intervalusetoken:
32
+ - "0"
33
+ Content-Length:
34
+ - "0"
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
37
+ Strict-Transport-Security:
38
+ - max-age=31536000
39
+ body:
40
+ encoding: UTF-8
41
+ string: ""
42
+ http_version:
43
+ recorded_at: Sat, 02 Jun 2018 21:21:47 GMT
44
44
  recorded_with: VCR 4.0.0
@@ -1,47 +1,47 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://www.fio.cz/ib_api/rest/set-last-id/<%= FioAPI.token %>/12345/
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 500
19
- message: Internal Server Error
20
- headers:
21
- Date:
22
- - Sat, 02 Jun 2018 21:21:47 GMT
23
- Server:
24
- - Apache-Coyote/1.1
25
- X-Content-Type-Options:
26
- - nosniff
27
- X-Xss-Protection:
28
- - 1; mode=block
29
- Referrer-Policy:
30
- - strict-origin-when-cross-origin
31
- Content-Type:
32
- - text/xml;charset=UTF-8
33
- Content-Length:
34
- - '406'
35
- X-Frame-Options:
36
- - SAMEORIGIN
37
- Strict-Transport-Security:
38
- - max-age=31536000
39
- Connection:
40
- - close
41
- body:
42
- encoding: ASCII-8BIT
43
- string: !binary |-
44
- PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PgoKPHJlc3BvbnNlIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzaTpub05hbWVzcGFjZVNjaGVtYUxvY2F0aW9uPSJodHRwczovL3d3dy5maW8uY3ovc2NoZW1hL3Jlc3BvbnNlLnhzZCI+Cgk8cmVzdWx0PiAKCQk8ZXJyb3JDb2RlPjMxPC9lcnJvckNvZGU+CgkJPHN0YXR1cz5lcnJvcjwvc3RhdHVzPgoJCTxtZXNzYWdlPlphcsOhxb5rYSBuZW1vaGxhIGLDvXQgbmFzdGF2ZW5hLCBwcm90b8W+ZSBwb2h5YklEIDEyMzQ1IG5hIFZhxaFlbSDDusSNdHUgbmVleGlzdHVqZS48L21lc3NhZ2U+CgkJPGRldGFpbD48L2RldGFpbD4KCTwvcmVzdWx0Pgo8L3Jlc3BvbnNlPg==
45
- http_version:
46
- recorded_at: Sat, 02 Jun 2018 21:21:47 GMT
3
+ - request:
4
+ method: get
5
+ uri: https://fioapi.fio.cz/rest/set-last-id/<%= FioAPI.token %>/12345/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 500
19
+ message: Internal Server Error
20
+ headers:
21
+ Date:
22
+ - Sat, 02 Jun 2018 21:21:47 GMT
23
+ Server:
24
+ - Apache-Coyote/1.1
25
+ X-Content-Type-Options:
26
+ - nosniff
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ Referrer-Policy:
30
+ - strict-origin-when-cross-origin
31
+ Content-Type:
32
+ - text/xml;charset=UTF-8
33
+ Content-Length:
34
+ - "406"
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
37
+ Strict-Transport-Security:
38
+ - max-age=31536000
39
+ Connection:
40
+ - close
41
+ body:
42
+ encoding: ASCII-8BIT
43
+ string: !binary |-
44
+ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PgoKPHJlc3BvbnNlIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzaTpub05hbWVzcGFjZVNjaGVtYUxvY2F0aW9uPSJodHRwczovL3d3dy5maW8uY3ovc2NoZW1hL3Jlc3BvbnNlLnhzZCI+Cgk8cmVzdWx0PiAKCQk8ZXJyb3JDb2RlPjMxPC9lcnJvckNvZGU+CgkJPHN0YXR1cz5lcnJvcjwvc3RhdHVzPgoJCTxtZXNzYWdlPlphcsOhxb5rYSBuZW1vaGxhIGLDvXQgbmFzdGF2ZW5hLCBwcm90b8W+ZSBwb2h5YklEIDEyMzQ1IG5hIFZhxaFlbSDDusSNdHUgbmVleGlzdHVqZS48L21lc3NhZ2U+CgkJPGRldGFpbD48L2RldGFpbD4KCTwvcmVzdWx0Pgo8L3Jlc3BvbnNlPg==
45
+ http_version:
46
+ recorded_at: Sat, 02 Jun 2018 21:21:47 GMT
47
47
  recorded_with: VCR 4.0.0
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://fioapi.fio.cz/rest/import/?token=somelongtoken&type=xml
6
+ body:
7
+ encoding: UTF-8
8
+ string:
9
+ "--------------------------UFUFp-y_DGK55ls6\r\nContent-Disposition:
10
+ form-data; name=\"file\"; filename=\"fio20180606-86327-8ctjzc\"\r\nContent-Type:
11
+ application/octet-stream\r\n\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Import
12
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://www.fio.cz/schema/importIB.xsd\">\n
13
+ \ <Orders>\n <DomesticTransaction>\n <accountFrom>11111111</accountFrom>\n
14
+ \ <currency>CZK</currency>\n <amount>100.0</amount>\n <accountTo>22222222</accountTo>\n
15
+ \ <bankCode>3030</bankCode>\n <ks/>\n <vs/>\n <ss/>\n <date>2018-05-05</date>\n
16
+ \ <messageForRecipient/>\n <comment/>\n <paymentType>431001</paymentType>\n
17
+ \ </DomesticTransaction>\n </Orders>\n</Import>\n\r\n--------------------------UFUFp-y_DGK55ls6--\r\n"
18
+ headers:
19
+ Content-Type:
20
+ - multipart/form-data; boundary=------------------------UFUFp-y_DGK55ls6
21
+ Boundary:
22
+ - "-----------RubyMultipartPost"
23
+ response:
24
+ status:
25
+ code: 500
26
+ message: Internal Server Error
27
+ headers:
28
+ Date:
29
+ - Wed, 06 Jun 2018 11:16:43 GMT
30
+ Server:
31
+ - Apache-Coyote/1.1
32
+ X-Content-Type-Options:
33
+ - nosniff
34
+ X-Xss-Protection:
35
+ - 1; mode=block
36
+ Referrer-Policy:
37
+ - strict-origin-when-cross-origin
38
+ Content-Type:
39
+ - text/plain;charset=UTF-8
40
+ Content-Length:
41
+ - "1"
42
+ X-Frame-Options:
43
+ - SAMEORIGIN
44
+ Strict-Transport-Security:
45
+ - max-age=31536000
46
+ Connection:
47
+ - close
48
+ body:
49
+ encoding: UTF-8
50
+ string: " "
51
+ http_version:
52
+ recorded_at: Wed, 06 Jun 2018 11:16:43 GMT
53
+ recorded_with: VCR 4.0.0
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fio_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Bortlik
8
8
  - Adam Martinik
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-06-04 00:00:00.000000000 Z
12
+ date: 2018-06-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -170,15 +170,17 @@ files:
170
170
  - spec/fixtures/vcr_cassettes/from_last_fetch.yml
171
171
  - spec/fixtures/vcr_cassettes/import.yml
172
172
  - spec/fixtures/vcr_cassettes/invalid_import.yml
173
+ - spec/fixtures/vcr_cassettes/old_import.yml
173
174
  - spec/fixtures/vcr_cassettes/set_last_fetch_date.yml
174
175
  - spec/fixtures/vcr_cassettes/set_last_fetch_id.yml
176
+ - spec/fixtures/vcr_cassettes/wrong_token_import.yml
175
177
  - spec/spec_helper.rb
176
178
  - spec/utils/hash_spec.rb
177
179
  homepage: http://github.com/14113/fio_api
178
180
  licenses:
179
181
  - MIT
180
182
  metadata: {}
181
- post_install_message:
183
+ post_install_message:
182
184
  rdoc_options: []
183
185
  require_paths:
184
186
  - lib
@@ -193,9 +195,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
195
  - !ruby/object:Gem::Version
194
196
  version: '0'
195
197
  requirements: []
196
- rubyforge_project:
197
- rubygems_version: 2.6.11
198
- signing_key:
198
+ rubygems_version: 3.4.21
199
+ signing_key:
199
200
  specification_version: 4
200
201
  summary: API wrapper for FIO bank
201
202
  test_files: []