Class: Infopark::Crm::Activity

Inherits:
Core::Resource show all
Defined in:
lib/crm_connector/activity.rb

Defined Under Namespace

Classes: Comment

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.search(input) ⇒ Array<Infopark::Crm::Activity>

Searches for activities

Examples:

results = Infopark::Crm::Activity.search(:params => {:state => 'created'})
results = Infopark::Crm::Activity.search(:params => {:kind => 'support-case'})
results = Infopark::Crm::Activity.search(:params => {:contact_id => cid})
results = Infopark::Crm::Activity.search(:params => {:account_id => aid})
results = Infopark::Crm::Activity.search(:params => {:q => 'full-text search'})

Parameters:

  • input (Hash)

    A hash containing a params key. The value of this key is a hash containing the actual search query.

Returns:

WebCRM Rest Url:

  • GET /api/activities/search


18
# File 'lib/crm_connector/activity.rb', line 18

has_search

Instance Method Details

#accountInfopark::Crm::Account

Queries the WebCRM for the Account with the id account_id.

Returns:

WebCRM Rest Url:

  • GET /api/accounts/account_id


51
52
53
# File 'lib/crm_connector/activity.rb', line 51

def 
  Infopark::Crm::Account.find() if 
end

#contactInfopark::Crm::Contact

Queries the WebCRM for the Contact with the id contact_id.

Returns:

WebCRM Rest Url:

  • GET /api/contacts/contact_id


43
44
45
# File 'lib/crm_connector/activity.rb', line 43

def contact
  Infopark::Crm::Contact.find(contact_id) if contact_id
end

#custom_typeInfopark::Crm::CustomType

Queries the WebCRM for the CustomType with the id kind.

Returns:

WebCRM Rest Url:

  • GET /api/custom_types/kind


59
60
61
# File 'lib/crm_connector/activity.rb', line 59

def custom_type
  Infopark::Crm::CustomType.find(kind) if kind
end