activewepay 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/activewepay.rb +8 -0
- data/lib/activewepay/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDRiNzM5ODI1ZmRiZmY0YWMwZjM4MDVhYzM0N2RhNTI4YjM1ZGVmOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjJjNmI5OGFlNjc1MjFhM2YzYzhiNTRhNjFjNjAxYWViNzBiMTVjZg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDZkZWVlZmFjZDA1NWRmZTRiNDAxNGE4MjcyZTMzNjAzYWNhNzg4YzllZTJm
|
10
|
+
YzllZDI0OWI4Y2NiOTE5MTQ1MjhmYzc5ODAxZDM4NjVmMzQyMmQ3YTUzZjEw
|
11
|
+
MzQ0YmZmZjZhNDEwYjBhM2Y0NDk3N2YyMzYyNTI4OTEzOGQyMjI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2I0OTdiNWU1MmJhMDQ3OGU4NjNhMGFkMGZmOWVkY2U0YTY2MzVmODdlMmI1
|
14
|
+
NzE5YjIwMjZiNzY2MDY4OTFiOTRiOGI4ODJlMzMwMDRkMzMxMWQ1YWVlNDE2
|
15
|
+
YzAwNTc4ODBjZDQwNmVlZmFlNzc5YmMwNjYzZmNmYTM2ODU1ZmU=
|
data/lib/activewepay.rb
CHANGED
@@ -64,10 +64,18 @@ module ActiveWepay
|
|
64
64
|
response = request.start {|http| http.request(call) }
|
65
65
|
# returns JSON response as ruby hash
|
66
66
|
@response = JSON.parse(response.body, :symbolize_names => true)
|
67
|
+
|
68
|
+
set_instance_variables(response)
|
67
69
|
|
68
70
|
self
|
69
71
|
end
|
70
72
|
|
73
|
+
def set_instance_variables(hash)
|
74
|
+
hash.each do |key, value|
|
75
|
+
instance_variable_set "@#{key}".to_sym, value rescue false
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
71
79
|
def validate_response
|
72
80
|
if @response[:error]
|
73
81
|
@errors.add(@response[:error].to_sym, @response[:error_description])
|
data/lib/activewepay/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activewepay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Asher Cohen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|