invertir-online 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e22d62d78144147a24bb67954db71fb52dfa10cc572e8524c848aef08424a69
4
- data.tar.gz: b01bb60f6cd5d2fc792bd2315d6183448de6900792350e5f9b003037cb39a9e3
3
+ metadata.gz: 7acf79e29e2041a183aa60954670b2686e92d89619975dcf81450b3caf1e832f
4
+ data.tar.gz: c788030ec1ec4bc5e7e342a26a228f990123652854a4b758297c0a38bb203f44
5
5
  SHA512:
6
- metadata.gz: 23f0951a7c896dace773fd893cebb2a695c3bb45808e36d1c304d44d2ddb59a68b30701956597d49e888dc84bcbd7e4574ce29bf0fdf7b9864725340c2f63485
7
- data.tar.gz: 637474bc32baae5af84056d9cd40e0b5b08c4d4247860169eafe6be3f2afb2f342ab4d5d1bf58f44172907e4729cfc723387833a90d97e9cc380263a85f188e0
6
+ metadata.gz: 593054b4ed3358714344bb304b75dcd0ae28d94b68884b35310f00b051838477cb0122950c7bd180ef11348d3ec8ffaea55ad1158891137ab0451da6e5aabd2d
7
+ data.tar.gz: 5f73bbe14103c18b3d08b06cb7fb27ffa28e6c80fa41b816efe517a9228587c4a06d44e14ccdccbf9037d56e664e94c1d2b970b95f7cbbd73e2e669c77768eba
@@ -21,11 +21,11 @@ module InvertirOnline
21
21
  end
22
22
 
23
23
  METHODS.each do |method|
24
- define_method(method[:name]) do |options = {}|
24
+ define_method(method[:name]) do |path_options = {}, query_options = {}|
25
25
  response = @clients[method[:client]].send(method[:action]) do |req|
26
- endpoint = replace_path_variables(ENDPOINTS[method[:endpoint]], options)
26
+ endpoint = replace_path_variables(ENDPOINTS[method[:endpoint]], path_options)
27
27
  req.url endpoint
28
- req.params.merge! options.map { |k, v| [camelize(k.to_s), v] }.to_h
28
+ req.params.merge! query_options.map { |k, v| [camelize(k.to_s), v] }.to_h
29
29
  end
30
30
  response.body
31
31
  end
@@ -8,7 +8,8 @@ module InvertirOnline
8
8
  sell_order: 'v2/operar/Vender',
9
9
  all_orders: 'v2/operaciones',
10
10
  account_info: 'v2/estadocuenta',
11
- price: 'v2/mercado/titulos/simbolo/cotizacion'
11
+ price: 'v2/mercado/titulos/simbolo/cotizacion',
12
+ klines: 'v2/mercado/titulos/simbolo/cotizacion/seriehistorica/fecha_desde/fecha_hasta/ajustada'
12
13
  }.freeze
13
14
  end
14
15
  end
@@ -18,6 +18,9 @@ module InvertirOnline
18
18
  # #price
19
19
  { name: :price, client: :signed,
20
20
  action: :get, endpoint: :price },
21
+ {
22
+ name: :klines, client: :signed,
23
+ action: :get, endpoint: :klines }
21
24
  ].freeze
22
25
  end
23
26
  end
@@ -1,3 +1,3 @@
1
1
  module InvertirOnline
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invertir-online
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agustin Pina
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-08 00:00:00.000000000 Z
11
+ date: 2021-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.10'
97
+ - !ruby/object:Gem::Dependency
98
+ name: activesupport
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '6.0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '6.0'
97
111
  description:
98
112
  email:
99
113
  - aguspina87@gmail.com