Class: ZendeskAPI::Ticket::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:

[View source]

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

has :author, :class => User

#author=(value) ⇒ ZendeskAPI::User

Returns The associated object

Parameters:

Returns:

[View source]

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

has :author, :class => User

#clear_associationsObject Originally defined in module Save

Removes all cached associations

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

#saveObject Also known as: save!

[View source]

414
415
416
417
418
419
420
421
# File 'lib/zendesk_api/resources.rb', line 414

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:

[View source]

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

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

#uploads=(value) ⇒ ZendeskAPI::Attachment

Returns The associated object

Parameters:

Returns:

[View source]

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

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