Class: ZendeskAPI::Request::Comment

Inherits:
DataResource show all
Includes:
Save
Defined in:
lib/zendesk_api/resources.rb

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 Method Details

#authorZendeskAPI::User

Returns The associated object

Returns:



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

has :author, :class => User

#author=(value) ⇒ ZendeskAPI::User

Returns The associated object

Parameters:

Returns:



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

has :author, :class => User

#clear_associationsObject Originally defined in module Save

Removes all cached associations

#handle_response(response) ⇒ Object Originally defined in module ZendeskAPI::ResponseHandler

#saveObject Also known as: save!



338
339
340
341
342
343
344
345
# File 'lib/zendesk_api/resources.rb', line 338

def save
  if new_record?
    save_associations
    true
  else
    false
  end
end

#save_associationsObject Originally defined in module Save

Saves associations Takes into account inlining, collections, and id setting on the parent resource.

#uploads(options = {}) ⇒ ZendeskAPI::Attachment

Returns The associated object

Parameters:

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

    Options to pass to the collection object

Returns:



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

has_many :uploads, :class => Attachment, :inline => true

#uploads=(value) ⇒ ZendeskAPI::Attachment

Returns The associated object

Parameters:

Returns:



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

has_many :uploads, :class => Attachment, :inline => true