Class: ZendeskAPI::Topic::TopicComment

Inherits:
ZendeskAPI::TopicComment show all
Includes:
Create, Destroy, Read, Update
Defined in:
lib/zendesk_api/resources.rb

Instance Attribute Summary

Attributes inherited from Data

#association, #attributes, #errors, #response

Class Method Summary collapse

Methods included from Destroy

#destroy, #destroy!, #destroyed?, included

Methods included from Update

included

Methods included from Save

#clear_associations, #save, #save!, #save_associations

Methods included from ResponseHandler

#handle_response

Methods included from Create

included

Methods included from Read

included, #reload!

Methods included from Sideloading

included, #set_includes

Methods inherited from Data

#==, #id, inherited, #initialize, #loaded_associations, #method_missing, namespace, new_from_response, #new_record?, #path, resource_name, resource_path, singular_resource_name, subclasses, #to_json, #to_s

Methods included from Associations

included, #wrap_resource

Constructor Details

This class inherits a constructor from ZendeskAPI::Data

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ZendeskAPI::Data

Class Method Details

.import(client, attributes) ⇒ Object



198
199
200
201
202
# File 'lib/zendesk_api/resources.rb', line 198

def self.import(client, attributes)
  comment = new(client, attributes)
  return unless comment.save(:path => 'import/' + comment.path)
  comment
end

.import!(client, attributes) ⇒ Object



192
193
194
195
196
# File 'lib/zendesk_api/resources.rb', line 192

def self.import!(client, attributes)
  new(client, attributes).tap do |comment|
    comment.save!(:path => 'import/' + comment.path)
  end
end