finapps 0.7.0.pre → 0.7.1.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/finapps/rest/transactions.rb +31 -1
- 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: 5bcb8bbdce504f491562723f44969165d65085a1
|
4
|
+
data.tar.gz: 5c3f47bd0c0f36c2674fb1a8b5130b3ce511d302
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3924521b771e0505f758101d8c0e80032c6ec023dc6d144bcdced3abcf210bc640c4131b60c5673151d26d2740158bc5587aa4d43a99d6369eb06a9e91ecc226
|
7
|
+
data.tar.gz: 34d0c64901b1164240ecab9ff931b2e15b6d6b16634cae933971df2774e491e571ddc9ae06296a4eb391c87e93870b40889d45697b736193bbb0c0cdf13a13be
|
@@ -4,8 +4,37 @@ module FinApps
|
|
4
4
|
class Transactions < FinApps::REST::Resources
|
5
5
|
include FinApps::REST::Defaults
|
6
6
|
|
7
|
+
# @transaction_id [String]
|
8
|
+
# # @return [Hash, Array<String>]
|
9
|
+
def search_by_id(transaction_id)
|
10
|
+
logger.debug "##{__method__.to_s} => Started"
|
11
|
+
|
12
|
+
transactions, error_messages = search_by_ids([transaction_id])
|
13
|
+
|
14
|
+
# get one
|
15
|
+
transaction = transactions.present? ? transactions.first : nil
|
16
|
+
|
17
|
+
logger.debug "##{__method__.to_s} => Completed"
|
18
|
+
return transaction, error_messages
|
19
|
+
end
|
20
|
+
|
21
|
+
# @transaction_ids [Array<String>]
|
22
|
+
# # @return [Array<Hash>, Array<String>]
|
23
|
+
def search_by_ids(transaction_ids)
|
24
|
+
logger.debug "##{__method__.to_s} => Started"
|
25
|
+
|
26
|
+
transactions, error_messages = search
|
27
|
+
|
28
|
+
# filter by given ids
|
29
|
+
transactions = transactions.present? ? transactions.select { |t| transaction_ids.include?(t[:_id]) } : nil
|
30
|
+
|
31
|
+
logger.debug "##{__method__.to_s} => Completed"
|
32
|
+
return transactions, error_messages
|
33
|
+
end
|
34
|
+
|
35
|
+
|
7
36
|
# @param [Hash] params
|
8
|
-
# @return [Array<
|
37
|
+
# @return [Array<Hash>, Array<String>]
|
9
38
|
def search(params={})
|
10
39
|
logger.debug "##{__method__.to_s} => Started"
|
11
40
|
|
@@ -20,6 +49,7 @@ module FinApps
|
|
20
49
|
end
|
21
50
|
|
22
51
|
# @param [Hash] params
|
52
|
+
# @return [Array<Hash>, Array<String>]
|
23
53
|
def edit(params={})
|
24
54
|
logger.debug "##{__method__.to_s} => Started"
|
25
55
|
|
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.7.
|
4
|
+
version: 0.7.1.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-
|
11
|
+
date: 2014-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|