Class: ZendeskAPI::Topic

Inherits:
Resource show all
Defined in:
lib/zendesk_api/resources.rb,
lib/zendesk_api/resources.rb

Defined Under Namespace

Classes: TopicComment, TopicVote

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

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

Returns:

  • (ZendeskAPI::Association)

    The association

- (Hash) attributes (readonly) Also known as: to_param Originally defined in class Data

The resource's attributes

Returns:

  • (Hash)

    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

Returns:

  • (Array)

    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

Parameters:

  • options (Hash) (defaults to: {})

    Options to pass to the collection object

Returns:



120
# File 'lib/zendesk_api/resources.rb', line 120

has_many :comments, :class => TopicComment

- (ZendeskAPI::TopicComment) comments=(value)

The associated object

Parameters:

Returns:



120
# File 'lib/zendesk_api/resources.rb', line 120

has_many :comments, :class => TopicComment

- (ZendeskAPI::Forum) forum

The associated object

Returns:



119
# File 'lib/zendesk_api/resources.rb', line 119

has Forum

- (ZendeskAPI::Forum) forum=(value)

The associated object

Parameters:

Returns:



119
# File 'lib/zendesk_api/resources.rb', line 119

has Forum

- (ZendeskAPI::TopicSubscription) subscriptions(options = {})

The associated object

Parameters:

  • options (Hash) (defaults to: {})

    Options to pass to the collection object

Returns:



121
# File 'lib/zendesk_api/resources.rb', line 121

has_many :subscriptions, :class => TopicSubscription

- (ZendeskAPI::TopicSubscription) subscriptions=(value)

The associated object

Parameters:

Returns:



121
# File 'lib/zendesk_api/resources.rb', line 121

has_many :subscriptions, :class => TopicSubscription

- (ZendeskAPI::Topic::TopicVote) vote

The associated object

Returns:



122
# File 'lib/zendesk_api/resources.rb', line 122

has :vote, :class => TopicVote

- (ZendeskAPI::Topic::TopicVote) vote=(value)

The associated object

Parameters:

Returns:



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