cbraspag 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cbraspag (0.9.0)
4
+ cbraspag (0.9.1)
5
5
  active_attr (>= 0.6)
6
6
  httpi (>= 0.9.6)
7
7
  json (>= 1.6.1)
@@ -11,7 +11,9 @@ module Braspag
11
11
  end
12
12
 
13
13
  def convert_to(method)
14
- self.send("to_#{method}")
14
+ data = {}
15
+ data = self.send("to_#{method}") if self.respond_to?("to_#{method}")
16
+ data
15
17
  end
16
18
 
17
19
  def to_authorize
@@ -26,7 +28,6 @@ module Braspag
26
28
  :customer_id => self.document.to_s,
27
29
  :emails => self.email.to_s
28
30
  }
29
-
30
31
  end
31
32
 
32
33
  def populate!(method)
@@ -147,7 +147,8 @@ module Braspag
147
147
  end
148
148
 
149
149
  def convert_to(method)
150
- data = self.send("to_#{method}")
150
+ data = {}
151
+ data = self.send("to_#{method}") if self.respond_to?("to_#{method}")
151
152
  data.merge!(self.customer.convert_to(method)) if self.customer
152
153
  data
153
154
  end
@@ -1,3 +1,3 @@
1
1
  module Braspag
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cbraspag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-19 00:00:00.000000000 Z
13
+ date: 2012-10-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: active_attr