PHP Class SevenShores\Hubspot\Resources\Companies

Inheritance: extends Resource
Show file Open project: fungku/hubspot-php Class Usage Examples

Public Methods

Method Description
addContact ( integer $contactId, integer $companyId ) : Response Associates a given contact to a given company If a contact is already associated to a different company, the contact will be added to the new company
all ( array $params = [] ) : Response Returns all companies
create ( array $properties ) : Response Create a company
delete ( integer $id ) : Response Deletes a company
getAssociatedContactIds ( integer $companyId, array $params = [] ) : Response Returns all of the contact IDs who are associated with the given company
getAssociatedContacts ( integer $companyId, array $params = [] ) : Response Returns an array of the associated contacts for the given company
getByDomain ( string $domain ) : Response Returns an array of companies that have a matching domain
getById ( integer $id ) : Response Returns a company with id $id
getRecentlyCreated ( array $params = [] ) : Response Returns the recently created companies
getRecentlyModified ( array $params = [] ) : Response Returns the recently modified companies
removeContact ( integer $contactId, integer $companyId ) : Response Removes a contact from a company
update ( integer $id, array $properties ) : Response Updates a company

Method Details

addContact() public method

Associates a given contact to a given company If a contact is already associated to a different company, the contact will be added to the new company
See also: http://developers.hubspot.com/docs/methods/companies/add_contact_to_company
public addContact ( integer $contactId, integer $companyId ) : Response
$contactId integer
$companyId integer
return SevenShores\Hubspot\Http\Response

all() public method

Returns all companies
See also: http://developers.hubspot.com/docs/methods/companies/get-all-companies
public all ( array $params = [] ) : Response
$params array Array of optional parameters ['limit', 'offset', 'properties']
return SevenShores\Hubspot\Http\Response

create() public method

Create a company
See also: http://developers.hubspot.com/docs/methods/companies/create_company
public create ( array $properties ) : Response
$properties array Array of company properties.
return SevenShores\Hubspot\Http\Response

delete() public method

Deletes a company
See also: http://developers.hubspot.com/docs/methods/companies/delete_company
public delete ( integer $id ) : Response
$id integer The company id
return SevenShores\Hubspot\Http\Response

getAssociatedContactIds() public method

Returns all of the contact IDs who are associated with the given company
See also: http://developers.hubspot.com/docs/methods/companies/get_company_contacts_by_id
public getAssociatedContactIds ( integer $companyId, array $params = [] ) : Response
$companyId integer The id of the company.
$params array Array of optional parameters ['count', 'vidOffset']
return SevenShores\Hubspot\Http\Response

getAssociatedContacts() public method

Returns an array of the associated contacts for the given company
See also: http://developers.hubspot.com/docs/methods/companies/get_company_contacts
public getAssociatedContacts ( integer $companyId, array $params = [] ) : Response
$companyId integer The id of the company.
$params array Array of optional parameters ['count', 'vidOffset']
return SevenShores\Hubspot\Http\Response

getByDomain() public method

Returns an array of companies that have a matching domain
See also: http://developers.hubspot.com/docs/methods/companies/get_companies_by_domain
public getByDomain ( string $domain ) : Response
$domain string The domain of the company eq. 'example.com'.
return SevenShores\Hubspot\Http\Response

getById() public method

Returns a company with id $id
See also: http://developers.hubspot.com/docs/methods/companies/get_company
public getById ( integer $id ) : Response
$id integer
return SevenShores\Hubspot\Http\Response

getRecentlyCreated() public method

Returns the recently created companies
See also: http://developers.hubspot.com/docs/methods/companies/get_companies_created
public getRecentlyCreated ( array $params = [] ) : Response
$params array Array of optional parameters ['count', 'offset']
return SevenShores\Hubspot\Http\Response

getRecentlyModified() public method

Returns the recently modified companies
See also: http://developers.hubspot.com/docs/methods/companies/get_companies_modified
public getRecentlyModified ( array $params = [] ) : Response
$params array Array of optional parameters ['count', 'offset']
return SevenShores\Hubspot\Http\Response

removeContact() public method

Removes a contact from a company
See also: http://developers.hubspot.com/docs/methods/companies/remove_contact_from_company
public removeContact ( integer $contactId, integer $companyId ) : Response
$contactId integer
$companyId integer
return SevenShores\Hubspot\Http\Response

update() public method

Updates a company
See also: http://developers.hubspot.com/docs/methods/companies/update_company
public update ( integer $id, array $properties ) : Response
$id integer The company id.
$properties array The company properties to update.
return SevenShores\Hubspot\Http\Response