Module: ZendeskAPI::Read

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

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Sideloading

#set_includes

Methods included from ResponseHandler

#handle_response

Class Method Details

.included(base) ⇒ Object



89
90
91
# File 'lib/zendesk_api/actions.rb', line 89

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#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