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
Example #1
0
 /**
  * Creates a Company with the HubSpotApi
  *
  * @return \SevenShores\Hubspot\Http\Response
  */
 private function createCompany()
 {
     $companyName = 'A company name';
     $companyDescription = 'A company description';
     $properties = [['name' => 'name', 'value' => $companyName], ['name' => 'description', 'value' => $companyDescription], ['name' => 'domain', 'value' => 'example.com']];
     $response = $this->companies->create($properties);
     sleep(1);
     return $response;
 }
Example #2
0
 /**
  * @return int
  */
 private function createCompany()
 {
     $companies = new Companies(new Client(['key' => 'demo']));
     return $companies->create(['name' => 'name', 'value' => 'dl_test_company' . uniqid()])->companyId;
 }