fidor_api 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fidor_api/model/transfer/generic.rb +18 -3
- data/lib/fidor_api/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee01124cbb731f40fa24ff1d634c0d0319b036b8dfecc16b965f32e64e71838b
|
4
|
+
data.tar.gz: d56c6df5925c9386296dd9c102f7c44a1a87325c61a2b09ca6e13b5f5fd9dd40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86d157602135d8a144f69573ff2ba5cc728258f9762ab01670fcbfd1c78d02aa6a99d5bbcb4d33d0471c4d69078ea0d96bc32dd296777aa85643e6e409d9d663
|
7
|
+
data.tar.gz: f75c69c028d4faeae5a1d8f58622eba7e9ffa52bd085911e639943dbf8da0b334d54d26ab9de8af77fa1e55cf57c8d473f1fe124825d934ae54eba7e5adc5b63
|
@@ -2,13 +2,12 @@ module FidorApi
|
|
2
2
|
module Model
|
3
3
|
module Transfer
|
4
4
|
class Generic < Model::Base
|
5
|
-
# TODO: Not all params are part of routing_info :(
|
6
5
|
SUPPORTED_ROUTING_TYPES = {
|
7
|
-
'SEPA' => %w[
|
6
|
+
'SEPA' => %w[remote_iban remote_bic],
|
8
7
|
'FOS_P2P_EMAIL' => %w[email],
|
9
8
|
'FOS_P2P_PHONE' => %w[mobile_phone_number],
|
10
9
|
'FOS_P2P_USERNAME' => %w[username],
|
11
|
-
'FPS' => %w[
|
10
|
+
'FPS' => %w[remote_account_number remote_sort_code]
|
12
11
|
}.freeze
|
13
12
|
|
14
13
|
attribute :id, :string
|
@@ -18,6 +17,7 @@ module FidorApi
|
|
18
17
|
attribute :currency, :string
|
19
18
|
attribute :subject, :string
|
20
19
|
attribute :beneficiary, :json
|
20
|
+
attribute :state, :string
|
21
21
|
|
22
22
|
attribute_decimal_methods :amount
|
23
23
|
|
@@ -60,6 +60,21 @@ module FidorApi
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
+
%w[bank contact].each do |category|
|
64
|
+
%w[name address_line_1 address_line_2 city country].each do |attribute|
|
65
|
+
define_method "#{category}_#{attribute}" do
|
66
|
+
@beneficiary ||= {}
|
67
|
+
@beneficiary.dig(category, attribute)
|
68
|
+
end
|
69
|
+
|
70
|
+
define_method "#{category}_#{attribute}=" do |value|
|
71
|
+
@beneficiary ||= {}
|
72
|
+
@beneficiary[category] ||= {}
|
73
|
+
@beneficiary[category][attribute] = value
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
63
78
|
def parse_errors(body)
|
64
79
|
body['errors'].each do |hash|
|
65
80
|
hash['field'].sub!('beneficiary.routing_info.', '')
|
data/lib/fidor_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fidor_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fidor Solutions AG
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.59.
|
131
|
+
version: 0.59.2
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.59.
|
138
|
+
version: 0.59.2
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: simplecov
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|