SevenShores\Hubspot\Resources\Deals::create PHP Method

create() public method

public create ( array $deal ) : mixed
$deal array Array of deal properties.
return mixed
    function create(array $deal)
    {
        $endpoint = "https://api.hubapi.com/deals/v1/deal";
        $options['json'] = $deal;
        return $this->client->request('post', $endpoint, $options);
    }

Usage Example

Example #1
0
 private function createDeal()
 {
     sleep(1);
     $response = $this->deals->create(["properties" => [["value" => "Cool Deal", "name" => "dealname"], ["value" => "60000", "name" => "amount"]]]);
     return $response;
 }