mrpin-sdk 1.0.82 → 1.0.83
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73e96429e6ca3d2b59feed79c4af902e2096cb48
|
4
|
+
data.tar.gz: ba88b3bc0a99d8d6b61b9ce282c0db3f43a0db00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a96c7fd114932531aa8e0b6929d02c456aafcf2bf802bdb88e839d28d782fd70ef6200a82514a2328b486881d2b626079dc0578aa21463a17a860d208e98df1c
|
7
|
+
data.tar.gz: fdb6165523c4f8c8086938d839512c59a22e47a4d7f38c1dcbbc19b2f5195412a6de5b8d879cc6000923c93fc351b4811a4c080e6dd6ad47112ace876302d4d7
|
@@ -0,0 +1,39 @@
|
|
1
|
+
class ExchangerYahoo0 < ExchangerBase
|
2
|
+
|
3
|
+
#
|
4
|
+
# properties
|
5
|
+
#
|
6
|
+
|
7
|
+
#
|
8
|
+
# methods
|
9
|
+
#
|
10
|
+
|
11
|
+
# default constructor
|
12
|
+
public
|
13
|
+
def initialize
|
14
|
+
super
|
15
|
+
@exchanger_api = ManagerRemoteHttp.new(url: 'https://quote.yahoo.com')
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
public
|
20
|
+
def get_rate(from_currency, to_currency)
|
21
|
+
params =
|
22
|
+
{
|
23
|
+
s: "#{from_currency}#{to_currency}=X",
|
24
|
+
f: 'l1',
|
25
|
+
e: '.csv'
|
26
|
+
}
|
27
|
+
|
28
|
+
response = @exchanger_api.get('d/quotes.csv', params)
|
29
|
+
|
30
|
+
assert(response[:status] == EResponseType::ERT_OK, response)
|
31
|
+
|
32
|
+
rate_string = response[:response]
|
33
|
+
|
34
|
+
rate_string.strip!
|
35
|
+
|
36
|
+
rate_string.to_f
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
data/mrpin-sdk.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'mrpin-sdk'
|
7
|
-
spec.version = '1.0.
|
7
|
+
spec.version = '1.0.83'
|
8
8
|
spec.authors = %w(Gregory Tkach Yakupov Dmitrij)
|
9
9
|
spec.email = %w(gregory.tkach@gmail.com yakupov.dmitrij@gmail.com)
|
10
10
|
spec.description = %q{Mrpin sdk for backend development.}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mrpin-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.83
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregory
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-
|
14
|
+
date: 2017-09-04 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -400,7 +400,8 @@ files:
|
|
400
400
|
- lib/mrpin/core/currency_exchanger/currency_exchanger.rb
|
401
401
|
- lib/mrpin/core/currency_exchanger/fixer/exchanger_fixer.rb
|
402
402
|
- lib/mrpin/core/currency_exchanger/local/exchanger_local.rb
|
403
|
-
- lib/mrpin/core/currency_exchanger/yahoo/
|
403
|
+
- lib/mrpin/core/currency_exchanger/yahoo/exchanger_yahoo0.rb
|
404
|
+
- lib/mrpin/core/currency_exchanger/yahoo/exchanger_yahoo1.rb
|
404
405
|
- lib/mrpin/core/error/error_server_base.rb
|
405
406
|
- lib/mrpin/core/exceptions/assertion_error.rb
|
406
407
|
- lib/mrpin/core/extensions/hash.rb
|