fidor_api 2.0.3 → 2.0.4

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
  SHA256:
3
- metadata.gz: ee01124cbb731f40fa24ff1d634c0d0319b036b8dfecc16b965f32e64e71838b
4
- data.tar.gz: d56c6df5925c9386296dd9c102f7c44a1a87325c61a2b09ca6e13b5f5fd9dd40
3
+ metadata.gz: 4555da23b1d2573b26ebd90b0dc339ba8851934c091b47d8937f2d97d10812b7
4
+ data.tar.gz: ef525828179ab50f04ad3f8068ccfab47fe132a6afc4e15087c3c8a1f07fdb64
5
5
  SHA512:
6
- metadata.gz: 86d157602135d8a144f69573ff2ba5cc728258f9762ab01670fcbfd1c78d02aa6a99d5bbcb4d33d0471c4d69078ea0d96bc32dd296777aa85643e6e409d9d663
7
- data.tar.gz: f75c69c028d4faeae5a1d8f58622eba7e9ffa52bd085911e639943dbf8da0b334d54d26ab9de8af77fa1e55cf57c8d473f1fe124825d934ae54eba7e5adc5b63
6
+ metadata.gz: 18ac3eccb7630de62725920635c2309127ea656c99cbbc05884b25c8dae612029ec17e26f823413ecd500f4f45f38d5a9c7984d7a42422776b8d0e6cd3a3a0c9
7
+ data.tar.gz: c59be179ad62fbc5b25ae497f4d80ff3465c030fd8eb7a26082f118d8a100d60a69935d2e13ec83b58ab0ca6d4bbc582d9b3efd1d6ff46d7484b7cf83e747668
@@ -1,6 +1,7 @@
1
1
  module FidorApi
2
2
  class Client
3
3
  module DSL
4
+ autoload :Accounts, 'fidor_api/client/dsl/accounts'
4
5
  autoload :Cards, 'fidor_api/client/dsl/cards'
5
6
  autoload :ConfirmableActions, 'fidor_api/client/dsl/confirmable_actions'
6
7
  autoload :CoreData, 'fidor_api/client/dsl/core_data'
@@ -10,6 +11,7 @@ module FidorApi
10
11
  autoload :Transfers, 'fidor_api/client/dsl/transfers'
11
12
 
12
13
  def self.included(klass)
14
+ klass.include Accounts
13
15
  klass.include Cards
14
16
  klass.include ConfirmableActions
15
17
  klass.include CoreData
@@ -0,0 +1,11 @@
1
+ module FidorApi
2
+ class Client
3
+ module DSL
4
+ module Accounts
5
+ def account_transactions(id, options = {})
6
+ fetch(:collection, Model::Transaction, "/accounts/#{id}/transactions", options)
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -2,6 +2,9 @@ module FidorApi
2
2
  module Model
3
3
  class Base
4
4
  class << self
5
+ # This makes define_method public to support Ruby lower than 2.5
6
+ public :define_method # rubocop:disable Style/AccessModifierDeclarations
7
+
5
8
  def inherited(klass)
6
9
  klass.include ActiveModel::Model
7
10
  klass.include Helpers::ActionViewSupport
@@ -22,7 +25,7 @@ module FidorApi
22
25
  attr_accessor :confirmable_action_id
23
26
 
24
27
  def as_json
25
- attributes.compact
28
+ attributes.reject { |_, v| v.nil? }
26
29
  end
27
30
 
28
31
  def parse_errors(body) # rubocop:disable Metrics/AbcSize
@@ -3,11 +3,12 @@ module FidorApi
3
3
  module Transfer
4
4
  class Generic < Model::Base
5
5
  SUPPORTED_ROUTING_TYPES = {
6
- 'SEPA' => %w[remote_iban remote_bic],
7
- 'FOS_P2P_EMAIL' => %w[email],
8
- 'FOS_P2P_PHONE' => %w[mobile_phone_number],
9
- 'FOS_P2P_USERNAME' => %w[username],
10
- 'FPS' => %w[remote_account_number remote_sort_code]
6
+ 'SEPA' => %w[remote_iban remote_bic instant],
7
+ 'FOS_P2P_EMAIL' => %w[email],
8
+ 'FOS_P2P_PHONE' => %w[mobile_phone_number],
9
+ 'FOS_P2P_ACCOUNT_NUMBER' => %w[account_number],
10
+ 'FOS_P2P_USERNAME' => %w[username],
11
+ 'FPS' => %w[remote_account_number remote_sort_code]
11
12
  }.freeze
12
13
 
13
14
  attribute :id, :string
@@ -1,3 +1,3 @@
1
1
  module FidorApi
2
- VERSION = '2.0.3'.freeze
2
+ VERSION = '2.0.4'.freeze
3
3
  end
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.3
4
+ version: 2.0.4
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-25 00:00:00.000000000 Z
11
+ date: 2018-11-12 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.2
131
+ version: 0.60.0
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.2
138
+ version: 0.60.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: simplecov
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -179,6 +179,7 @@ files:
179
179
  - lib/fidor_api/client/configuration.rb
180
180
  - lib/fidor_api/client/connection.rb
181
181
  - lib/fidor_api/client/dsl.rb
182
+ - lib/fidor_api/client/dsl/accounts.rb
182
183
  - lib/fidor_api/client/dsl/cards.rb
183
184
  - lib/fidor_api/client/dsl/confirmable_actions.rb
184
185
  - lib/fidor_api/client/dsl/core_data.rb