Class: ZendeskAPI::Topic
- Inherits:
- 
      Resource
      
        - Object
- Data
- DataResource
- Resource
- ZendeskAPI::Topic
 
- Defined in:
- lib/zendesk_api/resources.rb,
 lib/zendesk_api/resources.rb
Defined Under Namespace
Classes: TopicComment, TopicVote
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #attachments(options = {})  ⇒ ZendeskAPI::Attachment 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- 
  
    
      #attachments=(value)  ⇒ ZendeskAPI::Attachment 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- 
  
    
      #comments(options = {})  ⇒ ZendeskAPI::TopicComment 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- 
  
    
      #comments=(value)  ⇒ ZendeskAPI::TopicComment 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- 
  
    
      #forum  ⇒ ZendeskAPI::Forum 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- 
  
    
      #forum=(value)  ⇒ ZendeskAPI::Forum 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- 
  
    
      #subscriptions(options = {})  ⇒ ZendeskAPI::TopicSubscription 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- 
  
    
      #subscriptions=(value)  ⇒ ZendeskAPI::TopicSubscription 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- 
  
    
      #tags(options = {})  ⇒ ZendeskAPI::Tag 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- 
  
    
      #tags=(value)  ⇒ ZendeskAPI::Tag 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- 
  
    
      #uploads(options = {})  ⇒ ZendeskAPI::Attachment 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- 
  
    
      #uploads=(value)  ⇒ ZendeskAPI::Attachment 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- 
  
    
      #vote  ⇒ ZendeskAPI::Topic::TopicVote 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- 
  
    
      #vote=(value)  ⇒ ZendeskAPI::Topic::TopicVote 
    
    
  
  
  
  
  
  
  
  
  
    The associated object. 
- #votes(opts = {}) ⇒ Object
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
| 248 249 250 251 252 | # File 'lib/zendesk_api/resources.rb', line 248 def self.import(client, attributes) topic = new(client, attributes) return unless topic.save(:path => "import/topics") topic end | 
.import!(client, attributes) ⇒ Object
| 242 243 244 245 246 | # File 'lib/zendesk_api/resources.rb', line 242 def self.import!(client, attributes) new(client, attributes).tap do |topic| topic.save!(:path => "import/topics") end end | 
Instance Method Details
#attachments(options = {}) ⇒ ZendeskAPI::Attachment
Returns The associated object
| 232 | # File 'lib/zendesk_api/resources.rb', line 232 has_many Attachment | 
#attachments=(value) ⇒ ZendeskAPI::Attachment
Returns The associated object
| 232 | # File 'lib/zendesk_api/resources.rb', line 232 has_many Attachment | 
#comments(options = {}) ⇒ ZendeskAPI::TopicComment
Returns The associated object
| 228 | # File 'lib/zendesk_api/resources.rb', line 228 has_many :comments, :class => TopicComment | 
#comments=(value) ⇒ ZendeskAPI::TopicComment
Returns The associated object
| 228 | # File 'lib/zendesk_api/resources.rb', line 228 has_many :comments, :class => TopicComment | 
#forum ⇒ ZendeskAPI::Forum
Returns The associated object
| 227 | # File 'lib/zendesk_api/resources.rb', line 227 has Forum | 
#forum=(value) ⇒ ZendeskAPI::Forum
Returns The associated object
| 227 | # File 'lib/zendesk_api/resources.rb', line 227 has Forum | 
#subscriptions(options = {}) ⇒ ZendeskAPI::TopicSubscription
Returns The associated object
| 229 | # File 'lib/zendesk_api/resources.rb', line 229 has_many :subscriptions, :class => TopicSubscription | 
#subscriptions=(value) ⇒ ZendeskAPI::TopicSubscription
Returns The associated object
| 229 | # File 'lib/zendesk_api/resources.rb', line 229 has_many :subscriptions, :class => TopicSubscription | 
#tags(options = {}) ⇒ ZendeskAPI::Tag
Returns The associated object
| 231 | # File 'lib/zendesk_api/resources.rb', line 231 has_many Tag, :extend => Tag::Update, :inline => :create | 
#tags=(value) ⇒ ZendeskAPI::Tag
Returns The associated object
| 231 | # File 'lib/zendesk_api/resources.rb', line 231 has_many Tag, :extend => Tag::Update, :inline => :create | 
#uploads(options = {}) ⇒ ZendeskAPI::Attachment
Returns The associated object
| 233 | # File 'lib/zendesk_api/resources.rb', line 233 has_many :uploads, :class => Attachment, :inline => true | 
#uploads=(value) ⇒ ZendeskAPI::Attachment
Returns The associated object
| 233 | # File 'lib/zendesk_api/resources.rb', line 233 has_many :uploads, :class => Attachment, :inline => true | 
#vote ⇒ ZendeskAPI::Topic::TopicVote
Returns The associated object
| 230 | # File 'lib/zendesk_api/resources.rb', line 230 has :vote, :class => TopicVote | 
#vote=(value) ⇒ ZendeskAPI::Topic::TopicVote
Returns The associated object
| 230 | # File 'lib/zendesk_api/resources.rb', line 230 has :vote, :class => TopicVote | 
#votes(opts = {}) ⇒ Object
| 235 236 237 238 239 240 | # File 'lib/zendesk_api/resources.rb', line 235 def votes(opts = {}) return @votes if @votes && !opts[:reload] association = ZendeskAPI::Association.new(:class => TopicVote, :parent => self, :path => 'votes') @votes = ZendeskAPI::Collection.new(@client, TopicVote, opts.merge(:association => association)) end |