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
Instance Attribute Summary (collapse)
-
- (ZendeskAPI::Association) association
inherited
from Data
The association.
-
- (Hash) attributes
(also: #to_param)
inherited
from Data
readonly
The resource's attributes.
-
- (Object) error
inherited
from DataResource
Returns the value of attribute error.
-
- (Object) error_message
inherited
from DataResource
Returns the value of attribute error_message.
-
- (Array) errors
inherited
from Data
The last received errors.
-
- (Object) response
inherited
from Data
Place to dump the last response.
Instance Method Summary (collapse)
-
- (ZendeskAPI::TopicComment) comments(options = {})
The associated object.
-
- (ZendeskAPI::TopicComment) comments=(value)
The associated object.
-
- (ZendeskAPI::Forum) forum
The associated object.
-
- (ZendeskAPI::Forum) forum=(value)
The associated object.
-
- (ZendeskAPI::TopicSubscription) subscriptions(options = {})
The associated object.
-
- (ZendeskAPI::TopicSubscription) subscriptions=(value)
The associated object.
-
- (ZendeskAPI::Topic::TopicVote) vote
The associated object.
-
- (ZendeskAPI::Topic::TopicVote) vote=(value)
The associated object.
- - (Object) votes(opts = {})
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
Instance Attribute Details
- (ZendeskAPI::Association) association Originally defined in class Data
The association
- (Hash) attributes (readonly) Also known as: to_param Originally defined in class Data
The resource's attributes
- (Object) error Originally defined in class DataResource
Returns the value of attribute error
- (Object) error_message Originally defined in class DataResource
Returns the value of attribute error_message
- (Array) errors Originally defined in class Data
The last received errors
- (Object) response Originally defined in class Data
Place to dump the last response
Instance Method Details
- (ZendeskAPI::TopicComment) comments(options = {})
The associated object
120 |
# File 'lib/zendesk_api/resources.rb', line 120 has_many :comments, :class => TopicComment |
- (ZendeskAPI::TopicComment) comments=(value)
The associated object
120 |
# File 'lib/zendesk_api/resources.rb', line 120 has_many :comments, :class => TopicComment |
- (ZendeskAPI::Forum) forum
The associated object
119 |
# File 'lib/zendesk_api/resources.rb', line 119 has Forum |
- (ZendeskAPI::Forum) forum=(value)
The associated object
119 |
# File 'lib/zendesk_api/resources.rb', line 119 has Forum |
- (ZendeskAPI::TopicSubscription) subscriptions(options = {})
The associated object
121 |
# File 'lib/zendesk_api/resources.rb', line 121 has_many :subscriptions, :class => TopicSubscription |
- (ZendeskAPI::TopicSubscription) subscriptions=(value)
The associated object
121 |
# File 'lib/zendesk_api/resources.rb', line 121 has_many :subscriptions, :class => TopicSubscription |
- (ZendeskAPI::Topic::TopicVote) vote
The associated object
122 |
# File 'lib/zendesk_api/resources.rb', line 122 has :vote, :class => TopicVote |
- (ZendeskAPI::Topic::TopicVote) vote=(value)
The associated object
122 |
# File 'lib/zendesk_api/resources.rb', line 122 has :vote, :class => TopicVote |
- (Object) votes(opts = {})
124 125 126 127 128 129 |
# File 'lib/zendesk_api/resources.rb', line 124 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 |