Class: ZendeskAPI::OrganizationMembership

Inherits:
ReadResource show all
Extended by:
CreateMany, DestroyMany
Includes:
Create, Destroy
Defined in:
lib/zendesk_api/resources.rb,
lib/zendesk_api/resources.rb

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

Class Method Details

.create_many!(client, attributes_array, association = Association.new(:class => self)) ⇒ JobStatus Originally defined in module CreateMany

Creates multiple resources using the create_many endpoint.

Parameters:

  • client (Client)

    The ZendeskAPI::Client object to be used

  • attributes_array (Array)

    An array of resources to be created.

Returns:

.destroy_many!(client, ids, association = Association.new(:class => self)) ⇒ JobStatus Originally defined in module DestroyMany

Destroys multiple resources using the destroy_many endpoint.

Parameters:

  • client (Client)

    The Client object to be used

  • ids (Array)

    An array of ids to destroy

Returns:

Instance Method Details

#clear_associationsObject Originally defined in module Save

Removes all cached associations

#destroy(&block) ⇒ Object Originally defined in module Destroy

Destroys, returning false on error.

#destroy!Boolean Originally defined in module Destroy

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

Returns:

  • (Boolean)

    Successful?

#destroyed?Boolean Originally defined in module Destroy

Has this object been deleted?

Returns:

  • (Boolean)

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

#organizationZendeskAPI::Organization

Returns The associated object

Returns:



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

has Organization

#organization=(value) ⇒ ZendeskAPI::Organization

Returns The associated object

Parameters:

Returns:



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

has Organization

#save(options = {}, &block) ⇒ Object Originally defined in module Save

Saves, returning false if it fails and attaching the errors

#save!(options = {}) ⇒ Boolean 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?

#save_associationsObject Originally defined in module Save

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

#userZendeskAPI::User

Returns The associated object

Returns:



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

has User

#user=(value) ⇒ ZendeskAPI::User

Returns The associated object

Parameters:

Returns:



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

has User