Skip to content

Commit d84a05a

Browse files
committed
Make additional_data available too.
1 parent 3648244 commit d84a05a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/pipedrive/base.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,16 @@ class Base < OpenStruct
3232
# @return [CloudApp::Base]
3333
def initialize(attrs = {})
3434
if attrs['data']
35-
super( attrs['data'] )
35+
struct_attrs = attrs['data']
36+
37+
if attrs['additional_data']
38+
struct_attrs.merge!(attrs['additional_data'])
39+
end
3640
else
37-
super(attrs)
41+
struct_attrs = attrs
3842
end
43+
44+
super(struct_attrs)
3945
end
4046

4147
# Updates the object.

0 commit comments

Comments
 (0)