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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NWYxZTg1NzNiMGI2MDJkYzljOTMyNDhhOGU4M2U5NzdkMGI4OGZiOA==
4
+ MDRiNzM5ODI1ZmRiZmY0YWMwZjM4MDVhYzM0N2RhNTI4YjM1ZGVmOQ==
5
5
  data.tar.gz: !binary |-
6
- YWQwMzk1OGEzNjIyMDI5ZTY5N2E1MmM4MjM1MGRlZGFlMmQwOWE4Mg==
6
+ NjJjNmI5OGFlNjc1MjFhM2YzYzhiNTRhNjFjNjAxYWViNzBiMTVjZg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- Yjk3ZDE4ZTlmYWQ2MTliZjc1ZDNjYmJjNTI5NjE5Njk0YzViMmRiYTIxYmVh
10
- OTYwZmU0ZDYzM2IxZDFjZjRkM2NiNjkwZGFlOGFiMmUzNzJmMzRiZjRhYjMy
11
- OWYyNzI3NDhjNWQ1ZjgyOGY4OTZhYWRjMDJkZjMyNGRlOWE0OTY=
9
+ NDZkZWVlZmFjZDA1NWRmZTRiNDAxNGE4MjcyZTMzNjAzYWNhNzg4YzllZTJm
10
+ YzllZDI0OWI4Y2NiOTE5MTQ1MjhmYzc5ODAxZDM4NjVmMzQyMmQ3YTUzZjEw
11
+ MzQ0YmZmZjZhNDEwYjBhM2Y0NDk3N2YyMzYyNTI4OTEzOGQyMjI=
12
12
  data.tar.gz: !binary |-
13
- YWMyODI3YTQ4ZTViMTYyYjBmZDVmNzMwYTcxYjRhYjAyY2VjZThkY2Q1ZmE4
14
- OWY2YmE3NTY3NDI1OGE4NDU3MWRlMzkzZmM1YTJkMTI1Yjk1OWQzNTZhMjBl
15
- NmFlMTQ2MDAzZmNkOGU5N2MyNzEzOGFhOTg3NTdiOWIwNDA5MTM=
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])
@@ -1,3 +1,3 @@
1
1
  module Activewepay
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
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
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-07 00:00:00.000000000 Z
11
+ date: 2013-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel