public function delete(Opportunity $opportunity): void
    {
        $id = $opportunity->getId();

        $opportunity->setId(null);

        $this->client->delete($this->prepareUrlForKey('delete-opportunity', ['id' => $id]));
    }
public function delete(Opportunity $opportunity): void
    {
        $id = $opportunity->getId();

        $opportunity->setId(null);

        $this->client->delete($this->prepareUrlForKey('delete-opportunity', ['id' => $id]));
    }
public function delete ( Opportunity $ opportunity ) : void { $ id = $ opportunity -> getId ( ) ; $ opportunity -> setId ( null ) ; $ this -> client -> delete ( $ this -> prepareUrlForKey ( 'delete-opportunity' , [ 'id' => $ id ] ) ) ; }
Deletes the given opportunity.

@param Opportunity $opportunity The opportunity to delete
Deletes the given opportunity .