Class: ZendeskAPI::Upload

Inherits:
Data
  • Object
show all
Includes:
Create, Destroy
Defined in:
lib/zendesk_api/resources.rb

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

- (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::Attachment) attachments(options = {})

The associated object

Parameters:

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

    Options to pass to the collection object

Returns:



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

has_many Attachment

- (ZendeskAPI::Attachment) attachments=(value)

The associated object

Parameters:

Returns:



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

has_many Attachment

- (Object) clear_associations Originally defined in module Save

Removes all cached associations

- (Object) destroy Originally defined in module Destroy

- (Boolean) destroy! Originally defined in module Destroy

If this resource hasn't already been deleted, then do so.

Returns:

  • (Boolean)

    Successful?

- (Boolean) destroyed? Originally defined in module Destroy

Has this object been deleted?

Returns:

  • (Boolean)

- (Object) id



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

def id; token; end

- (Object) save(options = {}) Originally defined in module Save

Saves, returning false if it fails and attaching the errors

- (Boolean) save!(options = {}) Originally defined in module Save

If this resource hasn't been deleted, then create or save it. Executes a POST if it is a Data#new_record?, otherwise a PUT. Merges returned attributes on success.

Returns:

  • (Boolean)

    Success?

- (Object) save_associations Originally defined in module Save

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