finapps 0.7.4.pre → 0.8.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/finapps/rest/defaults.rb +1 -0
- data/lib/finapps/rest/transactions.rb +6 -28
- data/lib/finapps/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 053deae1a0ea30fbfae18130b893c24dd356b494
|
4
|
+
data.tar.gz: 457afc8807199259674f16fad52505d8cee1dd0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c710fb458bc1c0f6f72bbb0925123e20f7ea69bf870c01670fc66e8936e50899f612e6f469dc42bd6f71223e3f9520bac5d5c071355ee210986b4c7c578c3187
|
7
|
+
data.tar.gz: 178c0ab7ebb21e3b689433b23888f0234b065207424318d3b2d7b276b316ea9a67b525a5c82cae69b88f3ba5bc364fb6e154902293bc8e2813e7647e84b04e4a
|
@@ -37,6 +37,7 @@ module FinApps
|
|
37
37
|
:user_institutions_status => 'institutions/user/:user_institution_id/status',
|
38
38
|
:user_institutions_refresh => 'institutions/user/refresh',
|
39
39
|
|
40
|
+
:transactions_show => 'transaction/:transaction_id',
|
40
41
|
:transactions_list => 'transactions/search',
|
41
42
|
:transactions_edit => 'transactions/edit',
|
42
43
|
|
@@ -6,43 +6,21 @@ module FinApps
|
|
6
6
|
|
7
7
|
# @transaction_id [String]
|
8
8
|
# # @return [Hash, Array<String>]
|
9
|
-
def
|
9
|
+
def show(transaction_id)
|
10
10
|
logger.debug "##{__method__.to_s} => Started"
|
11
11
|
|
12
|
+
end_point = Defaults::END_POINTS[:transactions_show]
|
13
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
+
path = end_point.sub ':user_institution_id', ERB::Util.url_encode(transaction_id)
|
16
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
15
17
|
|
16
|
-
|
17
|
-
transaction = transactions.present? ? transactions.first : nil
|
18
|
+
transaction, error_messages = @client.send(path, :post, params.compact)
|
18
19
|
|
19
20
|
logger.debug "##{__method__.to_s} => Completed"
|
20
21
|
return transaction, error_messages
|
21
22
|
end
|
22
23
|
|
23
|
-
# @transaction_ids [Array<String>]
|
24
|
-
# # @return [Array<Hash>, Array<String>]
|
25
|
-
def search_by_ids(transaction_ids)
|
26
|
-
logger.debug "##{__method__.to_s} => Started"
|
27
|
-
|
28
|
-
default_parameters = {
|
29
|
-
:begin_date => DateTime.new(2000, 1, 1, 00, 00, 00),
|
30
|
-
:end_date => Time.now,
|
31
|
-
:records_per_page => 50,
|
32
|
-
:page_number => 1,
|
33
|
-
:sort_by => 'date',
|
34
|
-
:sort_order => -1
|
35
|
-
}
|
36
|
-
transactions, error_messages = search default_parameters
|
37
|
-
|
38
|
-
# filter by given ids
|
39
|
-
logger.debug "##{__method__.to_s} => searching transaction matching ids: #{transaction_ids.inspect}"
|
40
|
-
transactions = transactions[:transactions].present? ? transactions[:transactions].select { |t| transaction_ids.include?(t[:_id]) } : nil
|
41
|
-
|
42
|
-
logger.debug "##{__method__.to_s} => Completed"
|
43
|
-
return transactions, error_messages
|
44
|
-
end
|
45
|
-
|
46
24
|
|
47
25
|
# @param [Hash] params
|
48
26
|
# @return [Array<Hash>, Array<String>]
|
data/lib/finapps/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: finapps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erich Quintero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|