finapps 0.6.0.pre → 0.7.0.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/client.rb +21 -0
- data/lib/finapps/rest/defaults.rb +5 -0
- data/lib/finapps/rest/transactions.rb +14 -0
- data/lib/finapps/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43601a6677c141e8c942a87ce42ca729df9ac52b
|
4
|
+
data.tar.gz: 78e99369b8ba1c1830cf1efd34e68acc4b273ccf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f574ea80b9c9dfb9034fe4bdc943d3cad70134678c6505ca4906556a2bbf2871ced97d583acbdea31c29d2e8b84eadea8be53184d226449638bfdcaf8b50d3ed
|
7
|
+
data.tar.gz: b34f7760681b2f0da0ba5dfd03d8b4102051b0f60ce4b514d8a34814ab365acf89048a701d5ddff109a167952bd617cc90426ef7da6013852b581eb351d75261
|
data/lib/finapps/rest/client.rb
CHANGED
@@ -147,6 +147,27 @@ module FinApps
|
|
147
147
|
response
|
148
148
|
end
|
149
149
|
|
150
|
+
# Performs an HTTP PUT request.
|
151
|
+
# Returns a hash obtained from parsing
|
152
|
+
# the JSON object in the response body.
|
153
|
+
#
|
154
|
+
# @param [String] path
|
155
|
+
# @param [Hash] params
|
156
|
+
# @return [Hash,Array<String>]
|
157
|
+
def put(path, params = {})
|
158
|
+
logger.debug "##{__method__.to_s} => Started"
|
159
|
+
raise MissingArgumentsError.new 'Missing argument: path.' if path.blank?
|
160
|
+
|
161
|
+
logger.debug "##{__method__.to_s} => PUT path:#{path} params:#{skip_sensitive_data(params)}"
|
162
|
+
response = @connection.put do |req|
|
163
|
+
req.url path
|
164
|
+
req.body = params
|
165
|
+
end
|
166
|
+
|
167
|
+
logger.debug "##{__method__.to_s} => Completed"
|
168
|
+
response
|
169
|
+
end
|
170
|
+
|
150
171
|
# Performs an HTTP DELETE request.
|
151
172
|
# Returns a hash obtained from parsing
|
152
173
|
# the JSON object in the response body.
|
@@ -38,8 +38,13 @@ module FinApps
|
|
38
38
|
:user_institutions_refresh => 'institutions/user/refresh',
|
39
39
|
|
40
40
|
:transactions_list => 'transactions/search',
|
41
|
+
:transactions_edit => 'transactions/edit',
|
41
42
|
|
42
43
|
:categories_list => 'categories',
|
44
|
+
:categories_new => 'categories',
|
45
|
+
:categories_edit => 'categories',
|
46
|
+
:categories_show => 'categories/:category_id',
|
47
|
+
:categories_delete => 'categories/:category_id',
|
43
48
|
|
44
49
|
:geo_record_by_ip_address => 'geo/maxmind/record/:ip_address',
|
45
50
|
:geo_record_by_region => 'geo/maxmind/record/:region/:city',
|
@@ -19,6 +19,20 @@ module FinApps
|
|
19
19
|
return transactions, error_messages
|
20
20
|
end
|
21
21
|
|
22
|
+
# @param [Hash] params
|
23
|
+
def edit(params={})
|
24
|
+
logger.debug "##{__method__.to_s} => Started"
|
25
|
+
|
26
|
+
path = Defaults::END_POINTS[:transactions_list]
|
27
|
+
|
28
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
29
|
+
|
30
|
+
transactions, error_messages = @client.send(path, :put, params.compact)
|
31
|
+
|
32
|
+
logger.debug "##{__method__.to_s} => Completed"
|
33
|
+
return transactions, error_messages
|
34
|
+
end
|
35
|
+
|
22
36
|
end
|
23
37
|
|
24
38
|
end
|
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.7.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-
|
11
|
+
date: 2014-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -244,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
244
244
|
version: 1.3.1
|
245
245
|
requirements: []
|
246
246
|
rubyforge_project:
|
247
|
-
rubygems_version: 2.4.
|
247
|
+
rubygems_version: 2.4.3
|
248
248
|
signing_key:
|
249
249
|
specification_version: 4
|
250
250
|
summary: FinApps REST API ruby client.
|