Module: ZendeskAPI::Read

Includes:
ResponseHandler
Included in:
ReadResource, Resource, TicketMetric, Topic::TopicComment, User::TopicComment
Defined in:
lib/zendesk_api/actions.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#handle_response(response) ⇒ Object Originally defined in module ResponseHandler

#reload!Object

Reloads a resource.



94
95
96
97
98
99
100
101
102
# File 'lib/zendesk_api/actions.rb', line 94

def reload!
  response = @client.connection.get(path) do |req|
    yield req if block_given?
  end

  handle_response(response)
  attributes.clear_changes
  self
end