Module: ZendeskAPI::ResponseHandler

Included in:
Read, Save
Defined in:
lib/zendesk_api/actions.rb

Instance Method Summary collapse

Instance Method Details

#handle_response(response) ⇒ Object



3
4
5
6
7
# File 'lib/zendesk_api/actions.rb', line 3

def handle_response(response)
  if response.body.is_a?(Hash) && response.body[self.class.singular_resource_name]
    @attributes.replace(@attributes.deep_merge(response.body[self.class.singular_resource_name]))
  end
end