finapps 0.13.0.pre → 0.13.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7aabd3723383e152eac1916488fc404775b9f008
4
- data.tar.gz: 2c475caedbf8426b987727e81bf1e93a523dc242
3
+ metadata.gz: 8ef6ba809ba7dd91f998cb2045e26a7409ed3d01
4
+ data.tar.gz: bfef4428cc8429073dad267e98440d5d8d92fd5c
5
5
  SHA512:
6
- metadata.gz: 0dc414cf0b243fe18110f12fc1bdb4a8bb0993ef4c1b8909c377650f334dc163732389debe5c3cb25447b384387bb013cdc0df35fb4d8ec40245fbc691256d50
7
- data.tar.gz: 072cc09d3bb15d1ad0e9879cf22cbd752860fd380bccd982adcb42aed2d10bd60eec2d2d679e554d97416de4af9a9513d751000c0cde273b4dc49ecb75399d20
6
+ metadata.gz: 0efc7a1009ed9662c5ebec45985a9054076111f71317eb1b37df423441c899a9525430c44554bd18249b1e3c62dcd65c7745ad95b374d06de53b63905f722cc0
7
+ data.tar.gz: e5e9972f8fb004e699c8b06807a16927fd08c2383f6ef6f85da26fdae16c348274af36f070c60712c6ca61959cb84354a6fdc1a7d233abc4fddb1f2e03434382
@@ -7,7 +7,7 @@ module FinApps
7
7
  include FinApps::REST::Defaults
8
8
 
9
9
  # @return [Hash, Array<String>]
10
- def list(page = 1, requested=100, sort='date', asc=false, read=false)
10
+ def list(page = 1, requested=100, sort='date', asc=false, read='all')
11
11
  logger.debug "##{__method__.to_s} => Started"
12
12
 
13
13
  end_point = Defaults::END_POINTS[:alert_list]
@@ -27,19 +27,22 @@ module FinApps
27
27
  end
28
28
 
29
29
  # @return [Hash, Array<String>]
30
- def update(params)
30
+ def update(alert_id, read=true)
31
31
  logger.debug "##{__method__.to_s} => Started"
32
32
 
33
- raise MissingArgumentsError.new 'Missing argument: params.' if params.blank?
34
- logger.debug "##{__method__.to_s} => params: #{params.inspect}"
33
+ raise MissingArgumentsError.new 'Missing argument: alert_id.' if alert_id.blank?
34
+ logger.debug "##{__method__.to_s} => alert_id: #{alert_id.inspect}"
35
+ raise MissingArgumentsError.new 'Missing argument: alert_id.' if read.blank?
36
+ logger.debug "##{__method__.to_s} => alert_id: #{read.inspect}"
35
37
 
36
38
  end_point = Defaults::END_POINTS[:alert_update]
37
39
  logger.debug "##{__method__.to_s} => end_point: #{end_point}"
38
40
 
39
- path = end_point
41
+ path = end_point.sub ':alert_id', ERB::Util.url_encode(alert_id)
42
+ path = path.sub ':read', ERB::Util.url_encode(read)
40
43
  logger.debug "##{__method__.to_s} => path: #{path}"
41
44
 
42
- _, error_messages = @client.send(path, :put, params.compact)
45
+ _, error_messages = @client.send(path, :put)
43
46
 
44
47
  logger.debug "##{__method__.to_s} => Completed"
45
48
  error_messages
@@ -58,7 +58,7 @@ module FinApps
58
58
  :cashflow_show => 'cashflow/:start_date/:end_date',
59
59
 
60
60
  :alert_list => 'alerts/:page/:requested/:sort/:asc/:read',
61
- :alert_update => 'alerts',
61
+ :alert_update => 'alerts/:alert_id/:read',
62
62
 
63
63
  :alert_definition_list => 'alerts/definitions',
64
64
  :alert_definition_show => 'alerts/definitions/:alert_name',
@@ -1,3 +1,3 @@
1
1
  module FinApps
2
- VERSION = '0.13.0.pre'
2
+ VERSION = '0.13.1.pre'
3
3
  end
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.13.0.pre
4
+ version: 0.13.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: 2015-01-26 00:00:00.000000000 Z
11
+ date: 2015-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor