fidor_api 2.0.7 → 2.1.4
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/client/connection.rb +1 -1
- data/lib/fidor_api/client/dsl.rb +3 -1
- data/lib/fidor_api/client/dsl/accounts.rb +4 -0
- data/lib/fidor_api/client/dsl/cards.rb +4 -0
- data/lib/fidor_api/client/dsl/debit_returns.rb +19 -0
- data/lib/fidor_api/client/dsl/scheduled_transfers.rb +5 -1
- data/lib/fidor_api/client/dsl/standing_orders.rb +5 -1
- data/lib/fidor_api/client/dsl/transfers/generic.rb +1 -1
- data/lib/fidor_api/model.rb +1 -0
- data/lib/fidor_api/model/base.rb +2 -1
- data/lib/fidor_api/model/card.rb +2 -1
- data/lib/fidor_api/model/debit_return.rb +7 -0
- data/lib/fidor_api/model/scheduled_transfer.rb +1 -0
- data/lib/fidor_api/token.rb +2 -0
- data/lib/fidor_api/version.rb +1 -1
- metadata +15 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cfdcd83a4663a076d91fbf20f78062c7f7ac248b90f7b50283cbd6520914aab
|
4
|
+
data.tar.gz: 2d9926dcb6748ade46d26a428456ef90d788e6b83065c6c97a6c2149c91541da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51968d41201cd026fcb3aecf35bd801cb06bbd2fae7fa2778fa7039d8ce6ba8f9506609e04fe52d6cc43d6c340ea0d31c757c9714606a63fea12e939d48fe678
|
7
|
+
data.tar.gz: b6237115b19d87213b2493332b446c6002c2868082f62f47b93993974857719b638584720a24c088a72d47e5d9855883158df11a49a128847af72d7df536618b
|
data/lib/fidor_api/client/dsl.rb
CHANGED
@@ -5,6 +5,7 @@ module FidorApi
|
|
5
5
|
autoload :Cards, 'fidor_api/client/dsl/cards'
|
6
6
|
autoload :ConfirmableActions, 'fidor_api/client/dsl/confirmable_actions'
|
7
7
|
autoload :CoreData, 'fidor_api/client/dsl/core_data'
|
8
|
+
autoload :DebitReturns, 'fidor_api/client/dsl/debit_returns'
|
8
9
|
autoload :Messages, 'fidor_api/client/dsl/messages'
|
9
10
|
autoload :Preauths, 'fidor_api/client/dsl/preauths'
|
10
11
|
autoload :ScheduledTransfers, 'fidor_api/client/dsl/scheduled_transfers'
|
@@ -12,11 +13,12 @@ module FidorApi
|
|
12
13
|
autoload :Transactions, 'fidor_api/client/dsl/transactions'
|
13
14
|
autoload :Transfers, 'fidor_api/client/dsl/transfers'
|
14
15
|
|
15
|
-
def self.included(klass)
|
16
|
+
def self.included(klass) # rubocop:disable Metrics/MethodLength
|
16
17
|
klass.include Accounts
|
17
18
|
klass.include Cards
|
18
19
|
klass.include ConfirmableActions
|
19
20
|
klass.include CoreData
|
21
|
+
klass.include DebitReturns
|
20
22
|
klass.include Messages
|
21
23
|
klass.include Preauths
|
22
24
|
klass.include ScheduledTransfers
|
@@ -5,6 +5,10 @@ module FidorApi
|
|
5
5
|
def account_transactions(id, options = {})
|
6
6
|
fetch(:collection, Model::Transaction, "accounts/#{id}/transactions", options)
|
7
7
|
end
|
8
|
+
|
9
|
+
def account_transaction(account_id, transaction_id, options = {})
|
10
|
+
fetch(:single, Model::Transaction, "accounts/#{account_id}/transactions/#{transaction_id}", options)
|
11
|
+
end
|
8
12
|
end
|
9
13
|
end
|
10
14
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module FidorApi
|
2
|
+
class Client
|
3
|
+
module DSL
|
4
|
+
module DebitReturns
|
5
|
+
def debit_return(transaction_id, options = {})
|
6
|
+
fetch(:single, Model::DebitReturn, "transactions/#{transaction_id}/debit_return", options)
|
7
|
+
end
|
8
|
+
|
9
|
+
def create_debit_return(transaction_id, options = {})
|
10
|
+
create(FidorApi::Model::DebitReturn, "transactions/#{transaction_id}/debit_return", {}, options)
|
11
|
+
end
|
12
|
+
|
13
|
+
def confirm_debit_return(transaction_id, options = {})
|
14
|
+
request(:put, "/transactions/#{transaction_id}/debit_return/confirm", {}, options[:headers] || {})
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -23,7 +23,11 @@ module FidorApi
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def confirm_scheduled_transfer(id, options = {})
|
26
|
-
request(:put, "scheduled_transfers/#{id}/confirm", {}, options
|
26
|
+
request(:put, "scheduled_transfers/#{id}/confirm", {}, options[:headers])
|
27
|
+
end
|
28
|
+
|
29
|
+
def delete_scheduled_transfer(id, options = {})
|
30
|
+
request(:delete, "scheduled_transfers/#{id}", nil, options[:headers])
|
27
31
|
end
|
28
32
|
end
|
29
33
|
end
|
@@ -23,7 +23,11 @@ module FidorApi
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def confirm_standing_order(id, options = {})
|
26
|
-
request(:put, "standing_orders/#{id}/confirm", {}, options
|
26
|
+
request(:put, "standing_orders/#{id}/confirm", {}, options[:headers])
|
27
|
+
end
|
28
|
+
|
29
|
+
def delete_standing_order(id, options = {})
|
30
|
+
request(:delete, "standing_orders/#{id}", nil, options[:headers])
|
27
31
|
end
|
28
32
|
end
|
29
33
|
end
|
@@ -30,7 +30,7 @@ module FidorApi
|
|
30
30
|
|
31
31
|
def confirm_transfer(id, options = {})
|
32
32
|
check_transfer_support! :generic
|
33
|
-
request(:put, "/transfers/#{id}/confirm", {}, options
|
33
|
+
request(:put, "/transfers/#{id}/confirm", {}, options[:headers])
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
data/lib/fidor_api/model.rb
CHANGED
@@ -5,6 +5,7 @@ module FidorApi
|
|
5
5
|
autoload :Card, 'fidor_api/model/card'
|
6
6
|
autoload :ConfirmableAction, 'fidor_api/model/confirmable_action'
|
7
7
|
autoload :Customer, 'fidor_api/model/customer'
|
8
|
+
autoload :DebitReturn, 'fidor_api/model/debit_return'
|
8
9
|
autoload :Helpers, 'fidor_api/model/helpers'
|
9
10
|
autoload :Message, 'fidor_api/model/message'
|
10
11
|
autoload :Preauth, 'fidor_api/model/preauth'
|
data/lib/fidor_api/model/base.rb
CHANGED
@@ -36,7 +36,8 @@ module FidorApi
|
|
36
36
|
next unless respond_to?(field) || field == :base
|
37
37
|
|
38
38
|
if key
|
39
|
-
|
39
|
+
# https://github.com/rails/rails/issues/28903
|
40
|
+
errors.add(field, key.to_sym, hash.symbolize_keys.except(:message))
|
40
41
|
else
|
41
42
|
errors.add(field, hash.delete('message'), hash.symbolize_keys)
|
42
43
|
end
|
data/lib/fidor_api/model/card.rb
CHANGED
data/lib/fidor_api/token.rb
CHANGED
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.
|
4
|
+
version: 2.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fidor Solutions AG
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '5.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '5.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: faraday
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,14 +92,14 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
95
|
+
version: '13.0'
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
102
|
+
version: '13.0'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: rspec
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,14 +120,14 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - '='
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 0.
|
123
|
+
version: 0.75.0
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - '='
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 0.
|
130
|
+
version: 0.75.0
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: simplecov
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,7 +156,7 @@ dependencies:
|
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '3.4'
|
159
|
-
description:
|
159
|
+
description:
|
160
160
|
email:
|
161
161
|
- connect@fidor.com
|
162
162
|
executables: []
|
@@ -175,6 +175,7 @@ files:
|
|
175
175
|
- lib/fidor_api/client/dsl/cards.rb
|
176
176
|
- lib/fidor_api/client/dsl/confirmable_actions.rb
|
177
177
|
- lib/fidor_api/client/dsl/core_data.rb
|
178
|
+
- lib/fidor_api/client/dsl/debit_returns.rb
|
178
179
|
- lib/fidor_api/client/dsl/messages.rb
|
179
180
|
- lib/fidor_api/client/dsl/preauths.rb
|
180
181
|
- lib/fidor_api/client/dsl/scheduled_transfers.rb
|
@@ -199,6 +200,7 @@ files:
|
|
199
200
|
- lib/fidor_api/model/card.rb
|
200
201
|
- lib/fidor_api/model/confirmable_action.rb
|
201
202
|
- lib/fidor_api/model/customer.rb
|
203
|
+
- lib/fidor_api/model/debit_return.rb
|
202
204
|
- lib/fidor_api/model/helpers.rb
|
203
205
|
- lib/fidor_api/model/helpers/action_view_support.rb
|
204
206
|
- lib/fidor_api/model/helpers/attribute_decimal_methods.rb
|
@@ -220,7 +222,7 @@ homepage: https://github.com/fidor/fidor_api
|
|
220
222
|
licenses:
|
221
223
|
- MIT
|
222
224
|
metadata: {}
|
223
|
-
post_install_message:
|
225
|
+
post_install_message:
|
224
226
|
rdoc_options: []
|
225
227
|
require_paths:
|
226
228
|
- lib
|
@@ -235,8 +237,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
237
|
- !ruby/object:Gem::Version
|
236
238
|
version: '0'
|
237
239
|
requirements: []
|
238
|
-
rubygems_version: 3.0.
|
239
|
-
signing_key:
|
240
|
+
rubygems_version: 3.0.9
|
241
|
+
signing_key:
|
240
242
|
specification_version: 4
|
241
243
|
summary: Ruby client library to work with Fidor APIs
|
242
244
|
test_files: []
|