Skip to content

Commit c5ebd86

Browse files
committed
Return object type in API
1 parent 6f2dd2a commit c5ebd86

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lib/intercom/traits/api_resource.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def from_response(response)
2424

2525
def from_hash(hash)
2626
hash.each do |attribute, value|
27-
next if type_field?(attribute)
2827
initialize_property(attribute, value)
2928
end
3029
initialize_missing_flat_store_attributes if respond_to? :flat_store_attributes
@@ -106,10 +105,6 @@ def call_setter_for_attribute(attribute, value)
106105
self.send(setter_method, value)
107106
end
108107

109-
def type_field?(attribute)
110-
attribute.to_s == 'type'
111-
end
112-
113108
def initialize_missing_flat_store_attributes
114109
flat_store_attributes.each do |attribute|
115110
unless instance_variables_excluding_dirty_tracking_field.map(&:to_s).include? "@#{attribute}"

0 commit comments

Comments
 (0)