eport 0.0.1.1 → 0.0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README +5 -0
  2. data/lib/eport.rb +13 -0
  3. metadata +3 -3
data/README CHANGED
@@ -28,3 +28,8 @@ Catalog.
28
28
 
29
29
  eport = Eport.new
30
30
  eport.get_catalog
31
+
32
+ Balance.
33
+
34
+ eport = Eport.new
35
+ eport.get_balance
data/lib/eport.rb CHANGED
@@ -22,6 +22,19 @@ class Eport
22
22
  cp.new_catalog(data)
23
23
  end
24
24
 
25
+ def get_balance
26
+ req = Request.new do |r|
27
+ r.point = @config[:eport][:point]
28
+ r.private_key_path = "#{RAILS_ROOT}/#{@config[:eport][:private_key_path]}"
29
+
30
+ r.host = @config[:eport][:host]
31
+ r.path = "/cp/bal"
32
+ r.body = ""
33
+ end
34
+ ic = Iconv.new('UTF-8', 'WINDOWS-1251')
35
+ ic.iconv(req.confirm)
36
+ end
37
+
25
38
  def refill_operation(operation_name, operation_id, product_id, value, account)
26
39
  req = Request.new do |r|
27
40
  r.point = @config[:eport][:point]
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.0.1.1
9
+ - 2
10
+ version: 0.0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alexander Lomakin, Dmitry Andreev
@@ -15,7 +15,7 @@ autorequire: eport
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-04-28 00:00:00 +04:00
18
+ date: 2010-04-29 00:00:00 +04:00
19
19
  default_executable:
20
20
  dependencies: []
21
21